[theme-reviewers] Bundling libraries and prefixing

Rohit Tripathi rohitink at live.com
Thu Feb 27 15:05:33 UTC 2014


I agree to Ulrich. But, Unfortunately there is no such naming convention for common jquery scripts.

Date: Thu, 27 Feb 2014 16:02:46 +0100
From: grapplerulrich at gmail.com
To: theme-reviewers at lists.wordpress.org
Subject: Re: [theme-reviewers] Bundling libraries and prefixing

I would say no because if you have a plugin that uses novo slider also then you will load the script twice which can cause issues and is stupid to load the script twice. 
There should be a standard naming convention. So if the script is dependent on Jquery it should be jquery-nivo-slider. 
On 27 Feb 2014 15:35, "Rohit Tripathi" <rohitink at live.com> wrote:




It should be 
wp enqueue_script( 'themename-nivo-slider', ... );

As the rule states, all theme defined hooks/functions should be properly prefixed.

> Date: Thu, 27 Feb 2014 08:32:38 -0600

> From: kovshenin at gmail.com
> To: theme-reviewers at lists.wordpress.org
> Subject: [theme-reviewers] Bundling libraries and prefixing

> 
> Quick question.
> 
> If a theme bundled the Twitter Bootstrap library, or Nivo Slider, or
> jQuery Colorbox, should it prefix the wp_enqueue_script/style handles
> with the theme name, or should it use a generic name?

> 
> wp_enqueue_script( 'nivo-slider', ... );
> 
> vs
> 
> wp enqueue_script( 'themename-nivo-slider', ... );
> 
> Thanks!
> 
> -- 
> Konstantin

> _______________________________________________
> 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/20140227/7ded3c7b/attachment.html>


More information about the theme-reviewers mailing list