[theme-reviewers] jQuery

Sayontan Sinha sayontan at gmail.com
Wed May 30 22:00:35 UTC 2012

> My only question: is there *ever* a legitimate use of
> wp_deregister_script()?

I can think of one corner case, though it is really really rare. Let's say
you are using 2 external JS libraries in your theme that don't work with
each other out of the box (or they don't give you appropriate results). So
you tweak them to make them work. Now, your tweaks are done in a manner
that doesn't affect other plugins using unmodified versions of the script.
E.g. you might have added a "data" attribute to something in the script. If
you want the modified script to be picked up, you would want to deregister
the one from the plugin and register yours. Of course, there are potential
questions about namespacing such scripts, but those questions exist for any
script that is not bundled with WP itself, regardless of

I have had to modify libraries for a plugin - I couldn't get Fancybox /
Colorbox / PrettyPhoto to play nicely with JQuery Tooltip, so I had to put
in some modifications. I am guessing there might be theme authors requiring
to do something similar.


On Wed, May 30, 2012 at 2:48 PM, Chip Bennett <chip at chipbennett.net> wrote:

> I agree, too. I think adding wp_dereigster_script() to Theme Check would
> be a great idea. My only question: is there *ever* a legitimate use of
> wp_deregister_script()? If so, we can add it as INFO; if not, we can just
> go ahead and add it as REQUIRED. But, I want to be sure we've considered
> any unintended consequences before doing so.
> Chip
> On Wed, May 30, 2012 at 4:33 PM, esmi at quirm dot net <esmi at quirm.net>wrote:
>> on 30/05/2012 22:01 Emil Uzelac said the following:
>>> Also see:
>>> http://wpdevel.wordpress.com/**2011/12/12/use-wp_enqueue_**
>>> scripts-not-wp_print_styles-**to-enqueue-scripts-and-styles-**
>>> for-the-frontend/<http://wpdevel.wordpress.com/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/>
>> I am *so* not arguing against any of this but it does seem to me that the
>> relevant themes could be weeded out at the mandatory checks/upload point. I
>> assume the Theme Check plugin is based on the mandatory checks, yes?
>> Mel
>> --
>> http://quirm.net
>> http://blackwidows.co.uk
>> ______________________________**_________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.**wordpress.org<theme-reviewers at lists.wordpress.org>
>> http://lists.wordpress.org/**mailman/listinfo/theme-**reviewers<http://lists.wordpress.org/mailman/listinfo/theme-reviewers>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

Sayontan Sinha
http://mynethome.net | http://mynethome.net/blog
Beating Australia in Cricket is like killing a celebrity. The death gets
more coverage than the crime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120530/f7b8cc4d/attachment.htm>

More information about the theme-reviewers mailing list