Changeset 8653 for branches/2.0/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 07/20/2014 08:10:31 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/bp-xprofile/bp-xprofile-classes.php
r8651 r8653 1548 1548 */ 1549 1549 public function edit_field_options_html( array $args = array() ) { 1550 $options = $this->field_obj->get_children(); 1551 $date = BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] ); 1550 $options = $this->field_obj->get_children(); 1551 $date = BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] ); 1552 $eng_months = array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ); 1552 1553 1553 1554 $day = 0; … … 1580 1581 1581 1582 if ( ! empty( $_POST['field_' . $this->field_obj->id . '_month'] ) ) { 1582 $new_month = (int) $_POST['field_' . $this->field_obj->id . '_month']; 1583 $month = ( $month != $new_month ) ? $new_month : $month; 1583 if ( in_array( $_POST['field_' . $this->field_obj->id . '_month'], $eng_months ) ) { 1584 $new_month = $_POST['field_' . $this->field_obj->id . '_month']; 1585 } else { 1586 $new_month = $month; 1587 } 1588 1589 $month = ( $month !== $new_month ) ? $new_month : $month; 1584 1590 } 1585 1591 1586 1592 if ( ! empty( $_POST['field_' . $this->field_obj->id . '_year'] ) ) { 1587 $new_year = date( 'j', (int) $_POST['field_' . $this->field_obj->id . '_year'] );1593 $new_year = (int) $_POST['field_' . $this->field_obj->id . '_year']; 1588 1594 $year = ( $year != $new_year ) ? $new_year : $year; 1589 1595 } … … 1600 1606 1601 1607 case 'month': 1602 $eng_months = array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' );1603 1604 1608 $months = array( 1605 1609 __( 'January', 'buddypress' ),
Note: See TracChangeset
for help on using the changeset viewer.