Skip to:
Content

BuddyPress.org

Changeset 13418


Ignore:
Timestamp:
02/11/2023 07:48:59 AM (2 years ago)
Author:
imath
Message:

Second step towards only loading Template Packs assets in BP pages

In 11.0.0 we made a first step into this direction by making available a
filter to restrict Template Packs assets loading to BuddyPress pages. By
default this filter was returning false to carry on loading assets.

In 12.0.0 we are changing this default value to true so that we are now
only loading Template Packs assets in BP Pages. If you need to keep these
assets being loaded everywhere on your site, you'll have to hook to this
filter & return false.

Eg: `add_filter( 'bp_enqueue_assets_in_bp_pages_only', 'return_false'
);`

Props dcavins

Closes https://github.com/buddypress/buddypress/pull/64
Fixes #8679

File:
1 edited

Legend:

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

    r13306 r13418  
    514514     *
    515515     * @since 11.0.0
    516      *
    517      * @param bool $value False to carry on loading BP Assets "everywhere". True otherwise.
    518      */
    519     $bp_pages_only = apply_filters( 'bp_enqueue_assets_in_bp_pages_only', false );
     516     * @since 12.0.0 Default value has been switched from `false` to `true`.
     517     *
     518     * @param bool $value True to only load BP Assets inside BP generated pages. False otherwise.
     519     */
     520    $bp_pages_only = apply_filters( 'bp_enqueue_assets_in_bp_pages_only', true );
    520521
    521522    if ( 'embed' === $context || $bp_pages_only ) {
Note: See TracChangeset for help on using the changeset viewer.