[buddypress-trac] [BuddyPress Trac] #8679: Only load template pack JS & CSS assets when needed
buddypress-trac
noreply at wordpress.org
Tue Jul 19 06:34:32 UTC 2022
#8679: Only load template pack JS & CSS assets when needed
-----------------------------------+-----------------------
Reporter: imath | Owner: imath
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 11.0.0
Component: Templates | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+-----------------------
Changes (by imath):
* keywords: has-patch needs-testing => has-patch 2nd-opinion
Comment:
To follow up with the
[https://wordpress.slack.com/archives/C02RQBYUG/p1657137301420829
discussion we had during July 6 dev-chat], I've updated the patch to
introduce a new filter `bp_enqueue_assets_in_bp_pages_only` (instead of a
constant) we can use to customize how BuddyPress assets are loaded
according to 2 options:
1. everywhere (return `false` to the filter).
2. only in `is_buddypress()` areas (return `true` to the filter).
For 11.0.0 the default value will be `false`: we'll carry on loading BP
Assets everywhere. This way we take no risks with BP Plugins which might
need these assets everywhere while we let people wishing to contribute to
BuddyPress use `add_filter( 'bp_enqueue_assets_in_bp_pages_only',
'__return_true' );` to restrict BP assets to BP areas only. We'll be able
to see if these contributors warn us about broken things (I suspect mainly
in BP Legacy widgets).
Before releasing 12.0.0, we'll be able to change our default value to true
considering BP Plugins authors had time to check their plugins.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8679#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list