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-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.