Changeset 7150
- Timestamp:
- 06/04/2013 01:45:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-template.php
r7122 r7150 749 749 global $field; 750 750 751 $retval = !empty( $field->visibility_level ) ? $field->visibility_level : 'public'; 751 // On the registration page, values stored in POST should take 752 // precedence over default visibility, so that submitted values 753 // are not lost on failure 754 if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) { 755 $retval = esc_attr( $_POST['field_' . $field->id . '_visibility'] ); 756 } else { 757 $retval = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public'; 758 } 752 759 753 760 return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval ); … … 766 773 global $field; 767 774 768 $level = !empty( $field->visibility_level ) ? $field->visibility_level : 'public'; 775 // On the registration page, values stored in POST should take 776 // precedence over default visibility, so that submitted values 777 // are not lost on failure 778 if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) { 779 $level = esc_html( $_POST['field_' . $field->id . '_visibility'] ); 780 } else { 781 $level = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public'; 782 } 783 769 784 $fields = bp_xprofile_get_visibility_levels(); 770 785
Note: See TracChangeset
for help on using the changeset viewer.