BuddyPress - Version 2.0.2

Version Description

See: http://codex.buddypress.org/releases/version-2-0-2/

Download this release

Release Info

Developer DJPaul
Plugin Icon 128x128 BuddyPress
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

bp-loader.php CHANGED
@@ -16,7 +16,7 @@
16
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
17
  * Author: The BuddyPress Community
18
  * Author URI: http://buddypress.org/community/members/
19
- * Version: 2.0.1
20
  * Text Domain: buddypress
21
  * Domain Path: /bp-languages/
22
  * License: GPLv2 or later (license.txt)
@@ -303,7 +303,7 @@ class BuddyPress {
303
 
304
  /** Versions **************************************************/
305
 
306
- $this->version = '2.0.1';
307
  $this->db_version = 8311;
308
 
309
  /** Loading ***************************************************/
16
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
17
  * Author: The BuddyPress Community
18
  * Author URI: http://buddypress.org/community/members/
19
+ * Version: 2.0.2
20
  * Text Domain: buddypress
21
  * Domain Path: /bp-languages/
22
  * License: GPLv2 or later (license.txt)
303
 
304
  /** Versions **************************************************/
305
 
306
+ $this->version = '2.0.2';
307
  $this->db_version = 8311;
308
 
309
  /** Loading ***************************************************/
bp-themes/bp-default/rtl.css CHANGED
@@ -2,7 +2,7 @@
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
- * Version: 1.9
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
+ * Version: 2.0.2
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
bp-themes/bp-default/style.css CHANGED
@@ -2,7 +2,7 @@
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: [NOTE: except for security issues, BuddyPress Default is no longer being actively maintained by the BuddyPress team.] Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
- * Version: 1.9
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: [NOTE: except for security issues, BuddyPress Default is no longer being actively maintained by the BuddyPress team.] Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
+ * Version: 2.0.2
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
bp-xprofile/bp-xprofile-classes.php CHANGED
@@ -1189,10 +1189,12 @@ class BP_XProfile_ProfileData {
1189
  // If no value was found, cache an empty item
1190
  // to avoid future cache misses
1191
  } else {
1192
- $d = new stdClass;
1193
- $d->id = '';
1194
- $d->field_id = $field_id;
1195
- $d->value = '';
 
 
1196
 
1197
  wp_cache_set( $field_id, $d, $cache_group );
1198
  }
@@ -1547,8 +1549,9 @@ class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type {
1547
  * @since BuddyPress (2.0.0)
1548
  */
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'] );
 
1552
 
1553
  $day = 0;
1554
  $month = 0;
@@ -1579,12 +1582,17 @@ class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type {
1579
  }
1580
 
1581
  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;
 
 
 
 
 
1584
  }
1585
 
1586
  if ( ! empty( $_POST['field_' . $this->field_obj->id . '_year'] ) ) {
1587
- $new_year = date( 'j', (int) $_POST['field_' . $this->field_obj->id . '_year'] );
1588
  $year = ( $year != $new_year ) ? $new_year : $year;
1589
  }
1590
 
@@ -1599,8 +1607,6 @@ class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type {
1599
  break;
1600
 
1601
  case 'month':
1602
- $eng_months = array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' );
1603
-
1604
  $months = array(
1605
  __( 'January', 'buddypress' ),
1606
  __( 'February', 'buddypress' ),
@@ -2830,9 +2836,14 @@ abstract class BP_XProfile_Field_Type {
2830
 
2831
  <p class="sortable">
2832
  <span>&nbsp;&Xi;&nbsp;</span>
2833
- <input type="text" name="<?php echo esc_attr( "{$type}_option[{$j}]" ); ?>" id="<?php echo esc_attr( "{$type}_option{$j}" ); ?>" value="<?php echo esc_attr( $options[$i]->name ); ?>" />
2834
  <input type="<?php echo esc_attr( $control_type ); ?>" name="<?php echo esc_attr( "isDefault_{$type}_option{$default_name}" ); ?>" <?php checked( $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
2835
  <span><?php _e( 'Default Value', 'buddypress' ); ?></span>
 
 
 
 
 
2836
  </p>
2837
  <?php endfor; ?>
2838
 
1189
  // If no value was found, cache an empty item
1190
  // to avoid future cache misses
1191
  } else {
1192
+ $d = new stdClass;
1193
+ $d->id = '';
1194
+ $d->user_id = '';
1195
+ $d->field_id = $field_id;
1196
+ $d->value = '';
1197
+ $d->last_updated = '';
1198
 
1199
  wp_cache_set( $field_id, $d, $cache_group );
1200
  }
1549
  * @since BuddyPress (2.0.0)
1550
  */
1551
  public function edit_field_options_html( array $args = array() ) {
1552
+ $options = $this->field_obj->get_children();
1553
+ $date = BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] );
1554
+ $eng_months = array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' );
1555
 
1556
  $day = 0;
1557
  $month = 0;
1582
  }
1583
 
1584
  if ( ! empty( $_POST['field_' . $this->field_obj->id . '_month'] ) ) {
1585
+ if ( in_array( $_POST['field_' . $this->field_obj->id . '_month'], $eng_months ) ) {
1586
+ $new_month = $_POST['field_' . $this->field_obj->id . '_month'];
1587
+ } else {
1588
+ $new_month = $month;
1589
+ }
1590
+
1591
+ $month = ( $month !== $new_month ) ? $new_month : $month;
1592
  }
1593
 
1594
  if ( ! empty( $_POST['field_' . $this->field_obj->id . '_year'] ) ) {
1595
+ $new_year = (int) $_POST['field_' . $this->field_obj->id . '_year'];
1596
  $year = ( $year != $new_year ) ? $new_year : $year;
1597
  }
1598
 
1607
  break;
1608
 
1609
  case 'month':
 
 
1610
  $months = array(
1611
  __( 'January', 'buddypress' ),
1612
  __( 'February', 'buddypress' ),
2836
 
2837
  <p class="sortable">
2838
  <span>&nbsp;&Xi;&nbsp;</span>
2839
+ <input type="text" name="<?php echo esc_attr( "{$type}_option[{$j}]" ); ?>" id="<?php echo esc_attr( "{$type}_option{$j}" ); ?>" value="<?php echo esc_attr( stripslashes( $options[$i]->name ) ); ?>" />
2840
  <input type="<?php echo esc_attr( $control_type ); ?>" name="<?php echo esc_attr( "isDefault_{$type}_option{$default_name}" ); ?>" <?php checked( $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
2841
  <span><?php _e( 'Default Value', 'buddypress' ); ?></span>
2842
+
2843
+ <?php if ( 1 <= $i ) : ?>
2844
+ <a href="<?php echo esc_url( 'users.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
2845
+ <?php endif ;?>
2846
+
2847
  </p>
2848
  <?php endfor; ?>
2849
 
bp-xprofile/bp-xprofile-screens.php CHANGED
@@ -108,15 +108,7 @@ function xprofile_screen_edit_profile() {
108
  // Certain types of fields (checkboxes, multiselects) may come through empty. Save them as an empty array so that they don't get overwritten by the default on the next edit.
109
  $value = isset( $_POST['field_' . $field_id] ) ? $_POST['field_' . $field_id] : '';
110
 
111
- if ( !xprofile_set_field_data( $field_id, bp_displayed_user_id(), $value, $is_required[$field_id] ) ) {
112
- $errors = true;
113
- } else {
114
- do_action( 'xprofile_profile_field_data_updated', $field_id, $value );
115
- }
116
-
117
- // Save the visibility level
118
  $visibility_level = !empty( $_POST['field_' . $field_id . '_visibility'] ) ? $_POST['field_' . $field_id . '_visibility'] : 'public';
119
- xprofile_set_field_visibility_level( $field_id, bp_displayed_user_id(), $visibility_level );
120
 
121
  // Save the old and new values. They will be
122
  // passed to the filter and used to determine
@@ -129,6 +121,15 @@ function xprofile_screen_edit_profile() {
129
  'value' => $value,
130
  'visibility' => $visibility_level,
131
  );
 
 
 
 
 
 
 
 
 
132
  }
133
 
134
  do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values );
108
  // Certain types of fields (checkboxes, multiselects) may come through empty. Save them as an empty array so that they don't get overwritten by the default on the next edit.
109
  $value = isset( $_POST['field_' . $field_id] ) ? $_POST['field_' . $field_id] : '';
110
 
 
 
 
 
 
 
 
111
  $visibility_level = !empty( $_POST['field_' . $field_id . '_visibility'] ) ? $_POST['field_' . $field_id . '_visibility'] : 'public';
 
112
 
113
  // Save the old and new values. They will be
114
  // passed to the filter and used to determine
121
  'value' => $value,
122
  'visibility' => $visibility_level,
123
  );
124
+
125
+ if ( !xprofile_set_field_data( $field_id, bp_displayed_user_id(), $value, $is_required[$field_id] ) ) {
126
+ $errors = true;
127
+ } else {
128
+ do_action( 'xprofile_profile_field_data_updated', $field_id, $value );
129
+ }
130
+
131
+ // Save the visibility level
132
+ xprofile_set_field_visibility_level( $field_id, bp_displayed_user_id(), $visibility_level );
133
  }
134
 
135
  do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values );
bp-xprofile/bp-xprofile-template.php CHANGED
@@ -731,7 +731,7 @@ function bp_profile_visibility_radio_buttons( $args = '' ) {
731
 
732
  <?php echo $r['before_radio']; ?>
733
 
734
- <label for="<?php esc_attr( 'see-field_' . $r['field_id'] . '_' . $level['id'] ); ?>">
735
  <input type="radio" id="<?php echo esc_attr( 'see-field_' . $r['field_id'] . '_' . $level['id'] ); ?>" name="<?php echo esc_attr( 'field_' . $r['field_id'] . '_visibility' ); ?>" value="<?php echo esc_attr( $level['id'] ); ?>" <?php checked( $level['id'], bp_get_the_profile_field_visibility_level() ); ?> />
736
  <span class="field-visibility-text"><?php echo esc_html( $level['label'] ); ?></span>
737
  </label>
731
 
732
  <?php echo $r['before_radio']; ?>
733
 
734
+ <label for="<?php echo esc_attr( 'see-field_' . $r['field_id'] . '_' . $level['id'] ); ?>">
735
  <input type="radio" id="<?php echo esc_attr( 'see-field_' . $r['field_id'] . '_' . $level['id'] ); ?>" name="<?php echo esc_attr( 'field_' . $r['field_id'] . '_visibility' ); ?>" value="<?php echo esc_attr( $level['id'] ); ?>" <?php checked( $level['id'], bp_get_the_profile_field_visibility_level() ); ?> />
736
  <span class="field-visibility-text"><?php echo esc_html( $level['label'] ); ?></span>
737
  </label>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: johnjamesjacoby, DJPaul, boonebgorges, r-a-y
3
  Tags: social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, twitter, facebook, social, community, networks, networking, cms
4
  Requires at least: 3.6
5
- Tested up to: 3.9
6
- Stable tag: 2.0.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -77,6 +77,9 @@ BuddyPress is available in more than 20 languages. For more information, check o
77
 
78
  == Upgrade Notice ==
79
 
 
 
 
80
  = 2.0.1 =
81
  See: http://codex.buddypress.org/releases/version-2-0-1/
82
 
@@ -142,6 +145,9 @@ Fixes over 10 bugs.
142
 
143
  == Changelog ==
144
 
 
 
 
145
  = 2.0.1 =
146
  See: http://codex.buddypress.org/releases/version-2-0-1/
147
 
2
  Contributors: johnjamesjacoby, DJPaul, boonebgorges, r-a-y
3
  Tags: social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, twitter, facebook, social, community, networks, networking, cms
4
  Requires at least: 3.6
5
+ Tested up to: 3.9.1
6
+ Stable tag: 2.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
77
 
78
  == Upgrade Notice ==
79
 
80
+ = 2.0.2 =
81
+ See: http://codex.buddypress.org/releases/version-2-0-2/
82
+
83
  = 2.0.1 =
84
  See: http://codex.buddypress.org/releases/version-2-0-1/
85
 
145
 
146
  == Changelog ==
147
 
148
+ = 2.0.2 =
149
+ See: http://codex.buddypress.org/releases/version-2-0-2/
150
+
151
  = 2.0.1 =
152
  See: http://codex.buddypress.org/releases/version-2-0-1/
153