Skip to:
Content

BuddyPress.org

Changeset 3775


Ignore:
Timestamp:
01/20/2011 09:08:27 PM (14 years ago)
Author:
boonebgorges
Message:

Fixes function_exists error in previous commit. Adjusts admin menu hooks to be compatible with Network Admin in WP 3.1. Fixes #3017

Location:
branches/1.2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-activity.php

    r3218 r3775  
    100100}
    101101add_action( 'admin_menu', 'bp_activity_check_installed' );
     102add_action( 'network_admin_menu', 'bp_activity_check_installed' );
    102103
    103104function bp_activity_setup_root_component() {
  • branches/1.2/bp-blogs.php

    r3420 r3775  
    6262}
    6363add_action( 'admin_menu', 'bp_blogs_check_installed' );
     64add_action( 'network_admin_menu', 'bp_blogs_check_installed' );
    6465
    6566function bp_blogs_setup_globals() {
  • branches/1.2/bp-core.php

    r3447 r3775  
    286286}
    287287add_action( 'admin_menu', 'bp_core_check_installed' );
     288add_action( 'network_admin_menu', 'bp_core_check_installed' );
    288289
    289290/**
     
    301302        return false;
    302303
    303     /* Add the administration tab under the "Site Admin" tab for site administrators */
     304    // If this is WP 3.1+ and multisite is enabled, only load on the Network Admin
     305    if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin()  )
     306        return false;
     307
     308    // Add the administration tab under the "Site Admin" tab for site administrators
    304309    bp_core_add_admin_menu_page( array(
    305310        'menu_title' => __( 'BuddyPress', 'buddypress' ),
     
    314319}
    315320add_action( 'admin_menu', 'bp_core_add_admin_menu' );
     321add_action( 'network_admin_menu', 'bp_core_add_admin_menu' );
    316322
    317323/**
  • branches/1.2/bp-core/bp-core-adminbar.php

    r3774 r3775  
    292292    } elseif ( !defined( 'BP_DISABLE_ADMIN_BAR' ) || !BP_DISABLE_ADMIN_BAR ) {
    293293        // Keep the WP admin bar from loading
    294         show_admin_bar( false );
     294        if ( function_exists( 'show_admin_bar' ) )
     295            show_admin_bar( false );
    295296       
    296297        // Actions used to build the BP admin bar
  • branches/1.2/bp-forums.php

    r3192 r3775  
    104104}
    105105add_action( 'admin_menu', 'bp_forums_add_admin_menu' );
     106add_action( 'network_admin_menu', 'bp_forums_add_admin_menu' );
    106107
    107108/* Forum Functions */
  • branches/1.2/bp-friends.php

    r3218 r3775  
    6363}
    6464add_action( 'admin_menu', 'friends_check_installed' );
     65add_action( 'network_admin_menu', 'friends_check_installed' );
    6566
    6667function friends_setup_nav() {
  • branches/1.2/bp-groups.php

    r3271 r3775  
    118118}
    119119add_action( 'admin_menu', 'groups_check_installed' );
     120add_action( 'network_admin_menu', 'groups_check_installed' );
    120121
    121122function groups_setup_nav() {
  • branches/1.2/bp-messages.php

    r3218 r3775  
    9898}
    9999add_action( 'admin_menu', 'messages_check_installed' );
     100add_action( 'network_admin_menu', 'messages_check_installed' );
    100101
    101102function messages_setup_nav() {
  • branches/1.2/bp-xprofile.php

    r3218 r3775  
    153153}
    154154add_action( 'admin_menu', 'xprofile_add_admin_menu' );
     155add_action( 'network_admin_menu', 'xprofile_add_admin_menu' );
    155156
    156157/**
  • branches/1.2/bp-xprofile/bp-xprofile-cssjs.php

    r1963 r3775  
    22
    33function xprofile_add_admin_css() {
     4    // If this is WP 3.1+ and multisite is enabled, only load on the Network Admin
     5    if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin()  )
     6        return false;
     7   
    48    wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' );
    59}
    610add_action( 'admin_menu', 'xprofile_add_admin_css' );
     11add_action( 'network_admin_menu', 'xprofile_add_admin_css' );
    712
    813function xprofile_add_admin_js() {
     14    // If this is WP 3.1+ and multisite is enabled, only load on the Network Admin
     15    if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin()  )
     16        return false;
     17
    918    if ( strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
    1019        wp_enqueue_script( array( "jquery-ui-sortable" ) );
     
    1322}
    1423add_action( 'admin_menu', 'xprofile_add_admin_js', 1 );
     24add_action( 'network_admin_menu', 'xprofile_add_admin_js', 1 );
    1525
    1626?>
Note: See TracChangeset for help on using the changeset viewer.