<div dir="ltr">Here's what I would suggest:<div><br></div><div>1. If a script or stylesheet is custom to the Theme, then it should use a Theme-specific prefix</div><div>2. If the script/stylesheet is bundled with core, it should use the core-registered handle</div>
<div>3. If the script/stylesheet is an otherwise third-party resource, I would suggest merely using the script/stylesheet slug as the handle.</div><div><br></div><div>In the third case, there's no standard, so there's no way to ensure that the script/stylesheet won't get double-enqueued, no matter what you do. But by *not* prefixing it, you maximize the likelihood that a Plugin attempting to register the same script/stylesheet will use the same handle.</div>
<div><br></div><div>The point about namespacing in Themes is that it applies to things that are *custom* to the Theme: Theme-defined functions, variables, constants, transients, meta data, stylesheets, scripts, etc. A bundled, third-party script or stylesheet isn't custom to the Theme.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 13, 2014 at 8:55 AM, mudthemes support <span dir="ltr"><<a href="mailto:contact@mudthemes.com" target="_blank">contact@mudthemes.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well thanks for replying but my question is a bit different from the answer. Here it goes:<br>
<br>
# Scenario 1:<br>
<br>
Suppose Theme ABC enqueues a script which is a publicly available Javascript library (suppose 'tabulous.js'). The handle theme uses to enqueue the script is 'theme_slug_tabulous' and not 'tabulous'.<br>

<br>
In this case if another plugin also enqueues 'tabulous.js' then the theme will output two different tabulous.js files.<br>
<br>
Question: In case of a publicly available library, shouldn't the theme must use 'tabulous' instead of prefixing the theme slug.<br>
<br>
<br>
# Scenario 2:<br>
<br>
Another Theme XYZ enqueues a custom made javascript code with handle such as 'responsive' (without the theme-slug prefix).<br>
<br>
Question: In this case, should not the theme prefix the handle?<br>
<br>
<br>
# Scenario 3:<br>
<br>
Different themes use different handles to enqueue Google fonts such as 'Google-font-x'. Now this could create trouble when the same fonts are also enqueues via a plugin.<br>
<br>
Question: Is there any way to define a specific handle for a specific Google font and reduce the issue of duplicacy.<br>
<br>
<br>
Any suggestions, Thanks in Advance.<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 2014-05-13 07:27, Emil Uzelac wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
INCLUDING STYLESHEETS AND SCRIPTS # [2]<br>
<br>
        * Themes are REQUIRED to enqueue all stylesheets and scripts,<br>
using wp_enqueue_style() [3]/wp_enqueue_script() [4], and hooked into<div class=""><br>
an appropriate hook via callback function, rather than hard-coding<br>
stylesheet/script links or tags in the template.<br>
<br></div>
        * Themes are REQUIRED to use the Theme-specific hook for<br>
admin-enqueued scripts/stylesheets, e.g.<br>
admin_print_scripts-<u></u>appearance_page_$menu_slug<br>
        * Themes are RECOMMENDED to hook stylesheet and script enqueue<br>
callbacks into `wp_enqueue_scripts`<br>
        * Themes may OPTIONALLY link the default stylesheet (style.css)<div class=""><br>
directly in the document head, or via wp_enqueue_style(). Whichever<br>
method is used, the default stylesheet must be referenced<br></div>
via get_stylesheet_uri() [5]<br>
<br>
        * Themes are REQUIRED to use core-bundled scripts, if using such<div class=""><br>
scripts<br>
<br>
On Tue, May 13, 2014 at 2:58 AM, mudthemes support<br>
<<a href="mailto:contact@mudthemes.com" target="_blank">contact@mudthemes.com</a>> wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
A question regarding enqueuing script, style & Google fonts. When<br>
enqueuing them in a theme, the handle prefix should be what?<br>
<br>
1. JS Scripts and CSS files<br>
i) For publicly available libraries?<br>
ii) For custom created codes?<br>
<br>
2. Google Fonts<br>
1) When enqueued using <link> tag.<br>
<br>
Any suggestions, please?<br>
______________________________<u></u>_________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.<u></u>wordpress.org</a><br>
</div><a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/<u></u>mailman/listinfo/theme-<u></u>reviewers</a> [1]<br>
</blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/<u></u>mailman/listinfo/theme-<u></u>reviewers</a><br>
[2]<br>
<a href="http://make.wordpress.org/docs/theme-developer-handbook/releasing-your-theme/theme-review-guidelines/#including-stylesheets-and-scripts" target="_blank">http://make.wordpress.org/<u></u>docs/theme-developer-handbook/<u></u>releasing-your-theme/theme-<u></u>review-guidelines/#including-<u></u>stylesheets-and-scripts</a><br>

[3]<br>
<a href="http://make.wordpress.org/docs/theme-developer-handbook/releasing-your-theme/theme-review-guidelines/Function_Reference/wp_enqueue_style" target="_blank">http://make.wordpress.org/<u></u>docs/theme-developer-handbook/<u></u>releasing-your-theme/theme-<u></u>review-guidelines/Function_<u></u>Reference/wp_enqueue_style</a><br>

[4]<br>
<a href="http://make.wordpress.org/docs/theme-developer-handbook/releasing-your-theme/theme-review-guidelines/Function_Reference/wp_enqueue_script" target="_blank">http://make.wordpress.org/<u></u>docs/theme-developer-handbook/<u></u>releasing-your-theme/theme-<u></u>review-guidelines/Function_<u></u>Reference/wp_enqueue_script</a><br>

[5]<br>
<a href="http://make.wordpress.org/docs/theme-developer-handbook/releasing-your-theme/theme-review-guidelines/Function_Reference/get_stylesheet_uri" target="_blank">http://make.wordpress.org/<u></u>docs/theme-developer-handbook/<u></u>releasing-your-theme/theme-<u></u>review-guidelines/Function_<u></u>Reference/get_stylesheet_uri</a><div class="">
<br>
<br>
______________________________<u></u>_________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.<u></u>wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/<u></u>mailman/listinfo/theme-<u></u>reviewers</a><br>
</div></blockquote><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.<u></u>wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/<u></u>mailman/listinfo/theme-<u></u>reviewers</a><br>
</div></div></blockquote></div><br></div>