Skip to:
Content

BuddyPress.org

Changeset 4070


Ignore:
Timestamp:
02/23/2011 03:34:25 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Add a helper function to bp-core-wpabstraction.php to attach the 'network_admin_menu' action (which is new in WordPress 3.1) to the reliable 'admin_menu' action (which is present in WordPress 3.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core/bp-core-wpabstraction.php

    r3283 r4070  
    113113}
    114114
     115// Added for WordPress 3.1 support
     116if ( !function_exists( 'get_dashboard_url' ) ) {
     117
     118    /**
     119     * Make sure the 'network_admin_menu' hook (which is new to 3.1) fires
     120     * on our reliable friend 'admin_menu'
     121     */
     122    function bp_network_admin_menu() {
     123        do_action( 'network_admin_menu' );
     124    }
     125    add_action( 'admin_menu', 'bp_network_admin_menu' );
     126}
     127
    115128?>
Note: See TracChangeset for help on using the changeset viewer.