Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/26/2022 02:59:36 PM (2 years ago)
Author:
imath
Message:

First step towards only loading Template Packs assets in BP pages

Avoid loading these assets everywhere inside the blog is a frequent request made by BuddyPress users. In 11.0.0 we are doing a first step into this direction by making available a new filter to restrict Template Packs assets loading to BuddyPress pages.

We encourage these users to simply add the add_filter( 'bp_enqueue_assets_in_bp_pages_only', '__return_true' ); code into a BP Custom file for instance to contribute to testing whether it has an unwanted side effect on the BuddyPress plugins that they might have activated.

This will help us feel more secure about completely restricting these assets to BP pages in a second step.

Props dcavins

Fixes #8679

File:
1 edited

Legend:

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

    r12728 r13306  
    120120add_action( 'bp_after_setup_theme', 'bp_register_theme_compat_default_features',  10 );
    121121
     122// Adds a new hook to be sure to enqueue scripts when `is_buddypress()` is true.
     123add_action( 'bp_enqueue_scripts', 'bp_enqueue_community_scripts' );
     124
    122125// Load the admin.
    123126if ( is_admin() ) {
Note: See TracChangeset for help on using the changeset viewer.