Message info
 
To:buddypress-trac@lists.automattic.com From:buddypress-trac@lists.automattic.com Subject:[buddypress-trac] [BuddyPress][6088] tags/1.5.6: WP Version Checks: Date:Wed, 13 Jun 2012 21:00:27 +0000 (UTC)
 

Revision
6088
Author
johnjamesjacoby
Date
2012-06-13 21:00:27 +0000 (Wed, 13 Jun 2012)

Log Message

WP Version Checks:

* Fixes missing single-group menu.
* Fixes missing notifications menu.
* Fixes version float comparisons.
* Committing to 1.5.6 tag, as stable has not been bumped yet.

Modified Paths

Diff

Modified: tags/1.5.6/bp-core/bp-core-adminbar.php (6087 => 6088)


--- tags/1.5.6/bp-core/bp-core-adminbar.php	2012-06-13 20:53:06 UTC (rev 6087)
+++ tags/1.5.6/bp-core/bp-core-adminbar.php	2012-06-13 21:00:27 UTC (rev 6088)
@@ -20,7 +20,7 @@
  * @since BuddyPress (1.5.2)
  */
 function bp_core_admin_bar_version_check() {
-	if ( '3.2' == bp_get_major_wp_version() ) {
+	if ( 3.2 == bp_get_major_wp_version() ) {
 		add_action( 'bp_setup_admin_bar', 'bp_admin_bar_root_site',       3 );
 		add_action( 'bp_setup_admin_bar', 'bp_admin_bar_comments_menu',   3 );
 		add_action( 'bp_setup_admin_bar', 'bp_admin_bar_appearance_menu', 3 );
@@ -40,7 +40,7 @@
  */
 function bp_admin_bar_remove_wp_menus() {
 
-	if ( '3.2' == bp_get_major_wp_version() ) {
+	if ( 3.2 == bp_get_major_wp_version() ) {
 		remove_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 );
 		remove_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 );
 		remove_action( 'admin_bar_menu', 'wp_admin_bar_dashboard_view_site_menu', 25 );

Modified: tags/1.5.6/bp-groups/bp-groups-adminbar.php (6087 => 6088)


--- tags/1.5.6/bp-groups/bp-groups-adminbar.php	2012-06-13 20:53:06 UTC (rev 6087)
+++ tags/1.5.6/bp-groups/bp-groups-adminbar.php	2012-06-13 21:00:27 UTC (rev 6088)
@@ -49,7 +49,7 @@
 	if ( !is_super_admin() && !bp_group_is_admin() )
 		return false;
 
-	if ( '3.2' == bp_get_major_wp_version() ) {
+	if ( 3.2 == bp_get_major_wp_version() ) {
 
 		// Group avatar
 		$avatar = bp_core_fetch_avatar( array(
@@ -71,7 +71,7 @@
 			'href'  => bp_get_group_permalink( $bp->groups->current_group )
 		) );
 
-	} elseif ( '3.3' == bp_get_major_wp_version() ) {
+	} elseif ( 3.3 <= bp_get_major_wp_version() ) {
 		
 		// Unique ID for the 'My Account' menu
 		$bp->group_admin_menu_id = 'group-admin';

Modified: tags/1.5.6/bp-members/bp-members-adminbar.php (6087 => 6088)


--- tags/1.5.6/bp-members/bp-members-adminbar.php	2012-06-13 20:53:06 UTC (rev 6087)
+++ tags/1.5.6/bp-members/bp-members-adminbar.php	2012-06-13 21:00:27 UTC (rev 6088)
@@ -50,7 +50,7 @@
 	// Logged in user
 	if ( is_user_logged_in() ) {
 
-		if ( '3.2' == bp_get_major_wp_version() ) {
+		if ( 3.2 == bp_get_major_wp_version() ) {
 
 			// User avatar
 			$avatar = bp_core_fetch_avatar( array(
@@ -125,7 +125,7 @@
 	if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() )
 		return false;
 
-	if ( '3.2' == bp_get_major_wp_version() ) {
+	if ( 3.2 == bp_get_major_wp_version() ) {
 
 		// User avatar
 		$avatar = bp_core_fetch_avatar( array(
@@ -145,7 +145,7 @@
 			'href'  => bp_displayed_user_domain()
 		) );
 
-	} elseif ( '3.3' == bp_get_major_wp_version() ) {
+	} elseif ( 3.3 <= bp_get_major_wp_version() ) {
 		
 		// Unique ID for the 'My Account' menu
 		$bp->user_admin_menu_id = 'user-admin';
@@ -221,7 +221,7 @@
 		$menu_title = __( 'Notifications', 'buddypress' );
 	}
 
-	if ( '3.2' == bp_get_major_wp_version() ) {
+	if ( 3.2 == bp_get_major_wp_version() ) {
 
 		// Add the top-level Notifications button
 		$wp_admin_bar->add_menu( array(
@@ -230,7 +230,7 @@
 			'href'  => bp_loggedin_user_domain()
 		) );
 
-	} elseif ( '3.3' == bp_get_major_wp_version() ) {
+	} elseif ( 3.3 <= bp_get_major_wp_version() ) {
 		
 		// Add the top-level Notifications button
 		$wp_admin_bar->add_menu( array(

Modified: tags/1.5.6/bp-themes/bp-default/functions.php (6087 => 6088)


--- tags/1.5.6/bp-themes/bp-default/functions.php	2012-06-13 20:53:06 UTC (rev 6087)
+++ tags/1.5.6/bp-themes/bp-default/functions.php	2012-06-13 21:00:27 UTC (rev 6088)
@@ -83,7 +83,7 @@
 
 	// This theme allows users to set a custom background
 	// Backward-compatibility with WP < 3.4 will be removed in a future release
-	if ( bp_get_major_wp_version() >= 3.4 ) {
+	if ( 3.4 <= bp_get_major_wp_version() ) {
 		$custom_background_args = array(
 			'wp-head-callback' => 'bp_dtheme_custom_background_style'
 		);
@@ -107,7 +107,7 @@
 
 		// Add a way for the custom header to be styled in the admin panel that controls custom headers.
 		// Backward-compatibility with WP < 3.4 will be removed in a future release
-		if ( bp_get_major_wp_version() >= 3.4 ) {
+		if ( 3.4 <= bp_get_major_wp_version() ) {
 			$custom_header_args = array(
 				'wp-head-callback' => 'bp_dtheme_header_style',
 				'admin-head-callback' => 'bp_dtheme_admin_header_style'