Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/25/2023 05:18:41 PM (17 months ago)
Author:
imath
Message:

Fully deprecate bp_nav & bp_options_nav BP globals

These back compatibility mechanism, which was in BP since version 2.6, has moved to the BP Classic plugin.

Fixes #8927
Closes https://github.com/buddypress/buddypress/pull/121

File:
1 edited

Legend:

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

    r13492 r13507  
    276276        $bp->grav_default->blog  = apply_filters( 'bp_blog_gravatar_default',  $bp->grav_default->user );
    277277
    278         // Backward compatibility for plugins modifying the legacy bp_nav and bp_options_nav global properties.
    279         $bp->bp_nav         = new BP_Core_BP_Nav_BackCompat();
    280         $bp->bp_options_nav = new BP_Core_BP_Options_Nav_BackCompat();
     278        // Only fully deprecate the legacy navigation globals if BP Classic is not active.
     279        if ( ! function_exists( 'bp_classic' ) ) {
     280            // Backward compatibility for plugins modifying the legacy bp_nav and bp_options_nav global properties.
     281            $bp->bp_nav         = new BP_Core_BP_Nav_BackCompat();
     282            $bp->bp_options_nav = new BP_Core_BP_Options_Nav_BackCompat();
     283        }
    281284
    282285        /**
Note: See TracChangeset for help on using the changeset viewer.