Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/28/2024 03:30:07 AM (2 months ago)
Author:
espellcaste
Message:

Update the conditional that check if bp_classic is available.

Previously, we only checked if the bp_classic function was available, without checking if the plugin was also active.

Props imath, narenin, samedwards, and espellcaste.

Fixes #9181
Closes https://github.com/buddypress/buddypress/pull/371

File:
1 edited

Legend:

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

    r14026 r14029  
    52895289    return $screen_id === $bp->admin->current_screen;
    52905290}
     5291
     5292/**
     5293 * Common function to check if bp_classic is active or not.
     5294 *
     5295 * @since 15.0.0
     5296 *
     5297 * @return bool True if bp_classic is active, false otherwise.
     5298 */
     5299function bp_is_classic() {
     5300    return function_exists( 'bp_classic' ) || ( function_exists( 'is_plugin_active' ) && is_plugin_active( 'bp-classic/bp-classic.php' ) );
     5301}
Note: See TracChangeset for help on using the changeset viewer.