[buddypress-trac] [BuddyPress Trac] #5972: Password strength meter's JS re-uses theme compat. asset handle
buddypress-trac
noreply at wordpress.org
Sun Feb 22 20:17:13 UTC 2015
#5972: Password strength meter's JS re-uses theme compat. asset handle
-----------------------------------------+---------------------
Reporter: DJPaul | Owner: DJPaul
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.3
Component: Appearance - Template Parts | Version: 2.1
Severity: major | Resolution: fixed
Keywords: has-patch |
-----------------------------------------+---------------------
Changes (by djpaul):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9524"]:
{{{
#!CommitTicketReference repository="" revision="9524"
BP-Legacy: add a new param to `locate_asset_in_stack` to allow the
enqueued asset's `$handle`to be explicitly set.
Originally designed to load a template pack's main CSS and JS files in a
theme compatibility manner, in r8686 `locate_asset_in_stack` was used to
enqueue a JS file for password strength meters (registration and settings
screens). This worked, but the `$handle`, dynamically constructed and
passed to `wp_enqueue_script`, for the password strength JS file is likely
to be the exact same handle as that used for a template pack's main JS
file. This has the consequence of making the file(s) registered first
unenqueue-able.
The new parameter introduced by this change allows us to explicitly set
the name of an enqueued asset's handle, which avoids this problem.
Technically the script handle for the password strength meter JS was never
intentionally set, so we avoid most of the concerns of a backwards
compatibility break, and now allow developers to actually unenqueue a
template pack's CSS and JS.
Fixes #5972.
See also #5797.
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5972#comment:12>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list