[wp-trac] [WordPress Trac] #19568: Call `_doing_it_wrong` when plugin authors try to call `wp_deregister_script` on `jquery` in the Admin UI
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 15 19:58:50 UTC 2011
#19568: Call `_doing_it_wrong` when plugin authors try to call
`wp_deregister_script` on `jquery` in the Admin UI
-----------------------------------+------------------------------
Reporter: georgestephanis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+------------------------------
Comment (by georgestephanis):
No, actually.
I figured this way, if there were other handles to warn from
deregistering, we could just have an array of things they shouldn't
deregister -- rather than just being `jquery`.
Like if you also wanted to add in `jquery-ui` and `jquery-ui-core` or
something it would just be
`in_array( $handle, array( 'jquery', 'jquery-ui', 'jquery-ui-core' ) )`
and then the $handle is passed as an arg to sprintf so it will always
display the relevant one in the error message.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19568#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list