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-cssjs.php

    r13002 r13306  
    186186
    187187}
    188 add_action( 'bp_enqueue_scripts',      'bp_core_confirmation_js' );
     188add_action( 'bp_enqueue_community_scripts', 'bp_core_confirmation_js' );
    189189add_action( 'bp_admin_enqueue_scripts', 'bp_core_confirmation_js' );
    190190
     
    207207    add_action( 'bp_after_group_avatar_creation_step',    'bp_avatar_template_check' );
    208208}
    209 add_action( 'bp_enqueue_scripts', 'bp_core_avatar_scripts' );
     209add_action( 'bp_enqueue_community_scripts', 'bp_core_avatar_scripts' );
    210210
    211211/**
     
    222222    bp_attachments_enqueue_scripts( 'BP_Attachment_Cover_Image' );
    223223}
    224 add_action( 'bp_enqueue_scripts', 'bp_core_cover_image_scripts' );
     224add_action( 'bp_enqueue_community_scripts', 'bp_core_cover_image_scripts' );
    225225
    226226/**
     
    523523    }
    524524}
    525 add_action( 'bp_enqueue_scripts', 'bp_add_cover_image_inline_css', 11 );
     525add_action( 'bp_enqueue_community_scripts', 'bp_add_cover_image_inline_css', 11 );
    526526
    527527/**
     
    537537    bp_core_enqueue_livestamp();
    538538}
    539 add_action( 'bp_enqueue_scripts', 'bp_core_add_livestamp' );
     539add_action( 'bp_enqueue_community_scripts', 'bp_core_add_livestamp' );
    540540
    541541/**
Note: See TracChangeset for help on using the changeset viewer.