Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/31/2023 09:47:51 AM (3 years ago)
Author:
imath
Message:

BP Blocks: make sure theme compat is active before using a TP function

When a BuddyPress standalone theme is active (eg: BP Default) the bp_get_theme_compat_id() returns the ID of the active template pack (TP) (eg: "nouveau"), but it doesn't mean the corresponding template pack code is loaded, to be sure of it we need to use bp_is_theme_compat_active().

Fixes #8962 (branch 11.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/11.0/src/bp-activity/bp-activity-blocks.php

    r13108 r13538  
    7979
    8080        // Build the activity loop.
    81         if ( 'nouveau' === bp_get_theme_compat_id() ) {
     81        if ( bp_is_theme_compat_active() && 'nouveau' === bp_get_theme_compat_id() ) {
    8282                $bp_nouveau = bp_nouveau();
    8383
Note: See TracChangeset for help on using the changeset viewer.