Skip to:
Content

BuddyPress.org


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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/**
Note: See TracChangeset for help on using the changeset viewer.