Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/08/2011 06:46:09 PM (14 years ago)
Author:
djpaul
Message:

Switch to use the WP Admin Bar by default. See #3661

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-functions.php

    r5221 r5223  
    12891289 *
    12901290 * The WP Admin Bar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5.
    1291  *
    1292  * For the BP 1.5 development cycle, the BuddyBar will remain the default navigation for BP
    1293  * installations. In the future, this behavior will be changed, so that the WP Admin Bar is the
    1294  * default.
    1295  *
    1296  * @package BuddyPress
    1297  * @since 1.5
    1298  *
     1291 * For BP 1.6, the WP Admin Bar is the default.
     1292 *
     1293 * @return bool False when WP Admin Bar support is disabled; true when enabled (default)
     1294 * @since 1.5
    12991295 * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter
    1300  * @return bool False when WP Admin Bar support is disabled (default); true when enabled
    13011296 */
    13021297function bp_use_wp_admin_bar() {
    1303     return apply_filters( 'bp_use_wp_admin_bar', defined( 'BP_USE_WP_ADMIN_BAR' ) && BP_USE_WP_ADMIN_BAR );
     1298    $use_admin_bar = true;
     1299
     1300    // Has the WP Admin Bar constant been explicity set?
     1301    if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR )
     1302        $use_admin_bar = false;
     1303
     1304    // Has the admin chosen to use the BuddyBar during an upgrade?
     1305    elseif ( (bool) bp_get_option( 'bp-force-buddybar', false ) )
     1306        $use_admin_bar = false;
     1307
     1308    return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar );
    13041309}
    13051310
Note: See TracChangeset for help on using the changeset viewer.