- Timestamp:
- 01/06/2023 11:35:55 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php
r13372 r13392 193 193 // Check for updated posted values, and errors preventing them from 194 194 // being saved first time. 195 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_day'] ) ) {196 $new_day = (int) $_POST[ 'field_' . $this->field_obj->id . '_day'];195 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_day' ] ) ) { 196 $new_day = (int) $_POST[ 'field_' . $this->field_obj->id . '_day' ]; 197 197 $day = ( $day != $new_day ) ? $new_day : $day; 198 198 } 199 199 200 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_month'] ) ) {201 if ( in_array( $_POST[ 'field_' . $this->field_obj->id . '_month'], $eng_months ) ) {202 $new_month = $_POST[ 'field_' . $this->field_obj->id . '_month'];200 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_month' ] ) ) { 201 if ( in_array( $_POST[ 'field_' . $this->field_obj->id . '_month' ], $eng_months ) ) { 202 $new_month = $_POST[ 'field_' . $this->field_obj->id . '_month' ]; 203 203 } else { 204 204 $new_month = $month; … … 208 208 } 209 209 210 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_year'] ) ) {211 $new_year = (int) $_POST[ 'field_' . $this->field_obj->id . '_year'];210 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_year' ] ) ) { 211 $new_year = (int) $_POST[ 'field_' . $this->field_obj->id . '_year' ]; 212 212 $year = ( $year != $new_year ) ? $new_year : $year; 213 213 } … … 242 242 243 243 for ( $i = 0; $i < 12; ++$i ) { 244 $html .= sprintf( '<option value="%1$s" %2$s>%3$s</option>', esc_attr( $eng_months[ $i] ), selected( $month, $eng_months[$i], false ), $months[$i] );244 $html .= sprintf( '<option value="%1$s" %2$s>%3$s</option>', esc_attr( $eng_months[ $i ] ), selected( $month, $eng_months[ $i ], false ), $months[ $i ] ); 245 245 } 246 246 break;
Note: See TracChangeset
for help on using the changeset viewer.