Skip to:
Content

BuddyPress.org

Changeset 13537


Ignore:
Timestamp:
07/31/2023 09:38:15 AM (22 months 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().

See #8962 (trunk)
Closes https://github.com/buddypress/buddypress/pull/146

File:
1 edited

Legend:

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

    r13517 r13537  
    1717 *
    1818 * @since 9.0.0
    19  * 
     19 *
    2020 * @global BP_Activity_Template $activities_template The Activity template loop.
    2121 *
     
    8181
    8282    // Build the activity loop.
    83     if ( 'nouveau' === bp_get_theme_compat_id() ) {
     83    if ( bp_is_theme_compat_active() && 'nouveau' === bp_get_theme_compat_id() ) {
    8484        $bp_nouveau = bp_nouveau();
    8585
Note: See TracChangeset for help on using the changeset viewer.