diff --git src/bp-xprofile/bp-xprofile-admin.php src/bp-xprofile/bp-xprofile-admin.php
index 66d5c3f..6c93a0e 100644
|
|
function xprofile_admin_field( $admin_field, $admin_group, $class = '' ) { |
506 | 506 | <?php bp_the_profile_field_name(); ?> |
507 | 507 | |
508 | 508 | <?php if ( empty( $field->can_delete ) ) : ?><?php esc_html_e( '(Primary)', 'buddypress' ); endif; ?> |
509 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php esc_html_e( '(Required)', 'buddypress' ); endif; ?> |
| 509 | <?php bp_the_profile_field_required_label(); ?> |
510 | 510 | <?php if ( bp_xprofile_get_meta( $field->id, 'field', 'signup_position' ) ) : ?><?php esc_html_e( '(Sign-up)', 'buddypress' ); endif; ?> |
511 | 511 | <?php if ( bp_get_member_types() ) : echo $field->get_member_type_label(); endif; ?> |
512 | 512 | |
diff --git src/bp-xprofile/bp-xprofile-template.php src/bp-xprofile/bp-xprofile-template.php
index 7ee7a66..653776f 100644
|
|
function bp_profile_settings_visibility_select( $args = '' ) { |
1322 | 1322 | */ |
1323 | 1323 | return apply_filters( 'bp_profile_settings_visibility_select', $retval, $r, $args ); |
1324 | 1324 | } |
| 1325 | |
| 1326 | function bp_the_profile_field_required_label(){ |
| 1327 | echo bp_get_the_profile_field_required_label(); |
| 1328 | } |
| 1329 | |
| 1330 | function bp_get_the_profile_field_required_label(){ |
| 1331 | $retval = ''; |
| 1332 | |
| 1333 | if ( bp_get_the_profile_field_is_required() ) { |
| 1334 | $translated_string = __( ' (required)', 'buddypress' ); |
| 1335 | |
| 1336 | $retval = '<span class="bp-required-field-label">'; |
| 1337 | $retval .= apply_filters( 'bp_get_the_profile_field_required_label', $translated_string, bp_get_the_profile_field_id() ); |
| 1338 | $retval .= '</span>'; |
| 1339 | |
| 1340 | } |
| 1341 | return $retval; |
| 1342 | } |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
index 37888a6..e50a094 100644
|
|
class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { |
66 | 66 | <div class="checkbox"> |
67 | 67 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
68 | 68 | <?php bp_the_profile_field_name(); ?> |
69 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
70 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
71 | | <?php endif; ?> |
| 69 | <?php bp_the_profile_field_required_label(); ?> |
72 | 70 | </label> |
73 | 71 | |
74 | 72 | <?php |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php
index b71a91f..d328e58 100644
|
|
class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type { |
76 | 76 | |
77 | 77 | <div class="datebox"> |
78 | 78 | |
79 | | <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php esc_html_e( '(required)', 'buddypress' ); ?><?php endif; ?></label> |
| 79 | <label for="<?php bp_the_profile_field_input_name(); ?>_day"> |
| 80 | <?php bp_the_profile_field_name(); ?> |
| 81 | <?php bp_the_profile_field_required_label(); ?> |
| 82 | </label> |
| 83 | |
80 | 84 | <?php |
81 | 85 | |
82 | 86 | /** |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php
index a95fd86..fb31f64 100644
|
|
class BP_XProfile_Field_Type_Multiselectbox extends BP_XProfile_Field_Type { |
69 | 69 | 'name' => bp_get_the_profile_field_input_name() . '[]', |
70 | 70 | ) ); ?> |
71 | 71 | |
72 | | <label for="<?php bp_the_profile_field_input_name(); ?>[]"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> |
| 72 | <label for="<?php bp_the_profile_field_input_name(); ?>[]"> |
| 73 | <?php bp_the_profile_field_name(); ?> |
| 74 | <?php bp_the_profile_field_required_label(); ?> |
| 75 | </label> |
73 | 76 | |
74 | 77 | <?php |
75 | 78 | |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-number.php src/bp-xprofile/classes/class-bp-xprofile-field-type-number.php
index 6fac098..5f3ce13 100644
|
|
class BP_XProfile_Field_Type_Number extends BP_XProfile_Field_Type { |
63 | 63 | |
64 | 64 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
65 | 65 | <?php bp_the_profile_field_name(); ?> |
66 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
67 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
68 | | <?php endif; ?> |
| 66 | <?php bp_the_profile_field_required_label(); ?> |
69 | 67 | </label> |
70 | 68 | |
71 | 69 | <?php |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php
index d549075..668e6dc 100644
|
|
class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { |
65 | 65 | |
66 | 66 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
67 | 67 | <?php bp_the_profile_field_name(); ?> |
68 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
69 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
70 | | <?php endif; ?> |
| 68 | <?php bp_the_profile_field_required_label(); ?> |
71 | 69 | </label> |
72 | 70 | |
73 | 71 | <?php |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php
index 5431381..f2c1ef2 100644
|
|
class BP_XProfile_Field_Type_Selectbox extends BP_XProfile_Field_Type { |
63 | 63 | |
64 | 64 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
65 | 65 | <?php bp_the_profile_field_name(); ?> |
66 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
67 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
68 | | <?php endif; ?> |
| 66 | <?php bp_the_profile_field_required_label(); ?> |
69 | 67 | </label> |
70 | 68 | |
71 | 69 | <?php |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php src/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php
index 4b5ffc2..4d1aa7d 100644
|
|
class BP_XProfile_Field_Type_Textarea extends BP_XProfile_Field_Type { |
63 | 63 | |
64 | 64 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
65 | 65 | <?php bp_the_profile_field_name(); ?> |
66 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
67 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
68 | | <?php endif; ?> |
| 66 | <?php bp_the_profile_field_required_label(); ?> |
69 | 67 | </label> |
70 | 68 | |
71 | 69 | <?php |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php
index e8f78c2..a3f229f 100644
|
|
class BP_XProfile_Field_Type_Textbox extends BP_XProfile_Field_Type { |
63 | 63 | |
64 | 64 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
65 | 65 | <?php bp_the_profile_field_name(); ?> |
66 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
67 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
68 | | <?php endif; ?> |
| 66 | <?php bp_the_profile_field_required_label(); ?> |
69 | 67 | </label> |
70 | 68 | |
71 | 69 | <?php |
diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php
index 1a4cb86..bbdcaaf 100644
|
|
class BP_XProfile_Field_Type_URL extends BP_XProfile_Field_Type { |
66 | 66 | |
67 | 67 | <label for="<?php bp_the_profile_field_input_name(); ?>"> |
68 | 68 | <?php bp_the_profile_field_name(); ?> |
69 | | <?php if ( bp_get_the_profile_field_is_required() ) : ?> |
70 | | <?php esc_html_e( '(required)', 'buddypress' ); ?> |
71 | | <?php endif; ?> |
| 69 | <?php bp_the_profile_field_required_label(); ?> |
72 | 70 | </label> |
73 | 71 | |
74 | 72 | <?php |