Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/19/2021 04:25:39 AM (4 years ago)
Author:
imath
Message:

Entirely remove the code of the deprecated BuddyBar

The BuddyBar has been deprecated in version 2.1. We are now completely removing it.

Props r-a-y, DJPaul

Fixes #7729

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-adminbar.php

    r12495 r12893  
    4545
    4646/**
    47  * Handle the Toolbar/BuddyBar business.
     47 * Toggle the display of the toolbar based on certain conditions.
    4848 *
    4949 * @since 1.2.0
    5050 */
    5151function bp_core_load_admin_bar() {
    52 
    5352    // Show the Toolbar for logged out users.
    5453    if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) {
     
    5655    }
    5756
    58     // Hide the WordPress Toolbar and show the BuddyBar.
     57    // Hide the WordPress Toolbar.
    5958    if ( ! bp_use_wp_admin_bar() ) {
    60         _doing_it_wrong( __FUNCTION__, __( 'The BuddyBar is no longer supported. Please migrate to the WordPress toolbar as soon as possible.', 'buddypress' ), '2.1.0' );
    61 
    62         // Load deprecated code if not available.
    63         if ( ! function_exists( 'bp_core_admin_bar' ) ) {
    64             require buddypress()->plugin_dir . 'bp-core/deprecated/2.1.php';
    65         }
    66 
    6759        // Keep the WP Toolbar from loading.
    6860        show_admin_bar( false );
    69 
    70         // Actions used to build the BP Toolbar.
    71         add_action( 'bp_adminbar_logo',  'bp_adminbar_logo'               );
    72         add_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu',    2   );
    73         add_action( 'bp_adminbar_menus', 'bp_adminbar_account_menu',  4   );
    74         add_action( 'bp_adminbar_menus', 'bp_adminbar_thisblog_menu', 6   );
    75         add_action( 'bp_adminbar_menus', 'bp_adminbar_random_menu',   100 );
    76 
    77         // Actions used to append BP Toolbar to footer.
    78         add_action( 'wp_footer',    'bp_core_admin_bar', 8 );
    79         add_action( 'admin_footer', 'bp_core_admin_bar'    );
    8061    }
    8162}
Note: See TracChangeset for help on using the changeset viewer.