[theme-reviewers] Plugins and Themes

Daniel Tara contact at onedesigns.com
Fri Aug 24 23:29:38 UTC 2012


Plugins and/or themes shouldn't check for anything. wp_enqueue_script( 'jquery' ) ensures the script is printed only once. Any plugin or theme doing it differently is _doing_it_wrong();

Daniel

On Aug 25, 2012, at 2:03 AM, Emil Uzelac wrote:

> Gotcha, thanks for additional information.
> 
> Emil
> 
> On Fri, Aug 24, 2012 at 5:46 PM, Justin Tadlock <justin at justintadlock.com> wrote:
> Just a note on this:  The only thing that should de-register core-bundled scripts is a plugin for specifically doing that.  You could have something like the "Use Google jQuery" plugin.  Of course, that plugin should come with a warning that it could break stuff.  That's the only legitimate case I can think of though.
> 
> 
> On 8/24/2012 5:10 PM, Chip Bennett wrote:
>> I'm not sure I understand the question.
>> If a Theme wants to use jQuery, it should call wp_enqueue_script( 'jquery' ), to enqueue the core-bundled jQuery library.
>> If a Plugin wants to use jQuery, it should call wp_enqueue_script( 'jquery' ), to enqueue the core-bundled jQuery library.
>> No Theme or Plugin should de-register core-bundled jQuery, in order to register any other version of jQuery.
>> Out of curiosity: what prompted the question?
>> 
>> Chip
>> 
>> On Fri, Aug 24, 2012 at 4:57 PM, Emil Uzelac <emil at themeid.com> wrote:
>> Guys!
>> 
>> Should plugin check first if the Theme is already "calling" the jQuery and if it does, plugin should do nothing and also not to remove wp_enqueue_script and "inject" higher version via Google API?
>> 
>> Thanks,
>> Emil
>> 
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> 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
> 
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120825/dafa1647/attachment.htm>


More information about the theme-reviewers mailing list