Changeset 11295 for trunk/src/bp-xprofile/bp-xprofile-screens.php
- Timestamp:
- 12/13/2016 03:09:52 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-screens.php
r10825 r11295 86 86 $is_required = array(); 87 87 88 // Loop through the posted fields formatting any datebox values 89 // then validate the field. 88 // Loop through the posted fields formatting any datebox values then validate the field. 90 89 foreach ( (array) $posted_field_ids as $field_id ) { 91 if ( !isset( $_POST['field_' . $field_id] ) ) { 92 93 if ( !empty( $_POST['field_' . $field_id . '_day'] ) && !empty( $_POST['field_' . $field_id . '_month'] ) && !empty( $_POST['field_' . $field_id . '_year'] ) ) { 94 // Concatenate the values. 95 $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year']; 96 97 // Turn the concatenated value into a timestamp. 98 $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $date_value ) ); 99 } 100 101 } 90 bp_xprofile_maybe_format_datebox_post_data( $field_id ); 102 91 103 92 $is_required[ $field_id ] = xprofile_check_is_required_field( $field_id ) && ! bp_current_user_can( 'bp_moderate' );
Note: See TracChangeset
for help on using the changeset viewer.