Skip to:
Content

BuddyPress.org

Ticket #2023: 2023-1.2-branch.patch

File 2023-1.2-branch.patch, 1.7 KB (added by TobiasBg, 15 years ago)

Refreshed patch to add better logic checks

  • bp-core.php

     
    4141require ( BP_PLUGIN_DIR . '/bp-core/bp-core-notifications.php' );
    4242require ( BP_PLUGIN_DIR . '/bp-core/bp-core-signup.php' );
    4343
    44 /* If BP_DISABLE_ADMIN_BAR is defined, do not load the global admin bar. */
    45 if ( !defined( 'BP_DISABLE_ADMIN_BAR' ) )
     44/* If BP_DISABLE_ADMIN_BAR is defined and set to true, do not load the global admin bar. */
     45if ( ! ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR ) )
    4646        require ( BP_PLUGIN_DIR . '/bp-core/bp-core-adminbar.php' );
    4747
    4848/* Define the slug for member pages and the members directory (e.g. domain.com/[members] ) */
  • bp-core/bp-core-adminbar.php

     
    33function bp_core_admin_bar() {
    44        global $bp, $wpdb, $current_blog;
    55
    6         if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )
     6        if ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR )
    77                return false;
    88
    99        if ( (int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
  • bp-core/bp-core-cssjs.php

     
    1111function bp_core_add_admin_bar_css() {
    1212        global $bp, $current_blog;
    1313
    14         if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )
     14        if ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR )
    1515                return false;
    1616
    1717        if ( ( bp_core_is_multisite() && $current_blog->blog_id != BP_ROOT_BLOG ) || is_admin() ) {