One simple scenario (which is not recommended for themes) is the explicit de-registering of JQuery and registering a CDN version of it. Your subsequent scripts enqueue JQuery, but you will need to explicitly register the CDN version.<br>
<br>Here is another scenario:<br><ol><li>Let&#39;s say you are offering a handful of JS libraries A, B, C, D and E, of which A is a core dependency for all the others. <br></li><li>Now consider that the A could have two variants - a heavyweight feature-rich one a-full.js, and a &quot;lite&quot; one a-lite.js. Which one you load depends on an option you set in the back-end. <br>
</li><li>The dependent libraries can all operate using a-lite.js, but can operate just as well with a-full.js.</li></ol>To handle this scenario you could have 2 approaches:<br><ol><li>Conditionally register a-full or a-lite depending on the option selection with the same handle (like &quot;a-script&quot;), then enqueue B, C, D and E with &quot;a-script&quot; as a dependency</li>
<li>Do not assign the same handle, but write separate &quot;if&quot; conditions for each script. So you will register either a-script-full (for a-full.js) or a-script-lite (for a-lite.js), then for each of B, C, D and E you will enqueue with either a-script-full or a-script-lite as a dependency.</li>
</ol>The first method above uses &quot;register&quot; and involves a few lines of code less than the second, which only uses enqueue.<br><br>Hope this is clear.<br>Sayontan.<br><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 8:54 AM, esmi at quirm dot net <span dir="ltr">&lt;<a href="mailto:esmi@quirm.net">esmi@quirm.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">on 14/07/2011 13:14 Chip Bennett said the following:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Those scripts look fine to include; however, you will need to register and<br>
enqueue them properly, using wp_register_script() and wp_enqueue_script(),<br>
via a function hooked into the wp_enqueue_scripts hook.<br>
</blockquote>
<br>
[Playing catch-up]<br>
<br>
This brings up a question that I&#39;m pretty sure remained unanswered on the support forums. Is there any benefit to going through the full register then enqueue for a script compared to just dropping everything into an enqueue? Both methods seem to have equal weight in the Codex.<br>

<br>
Mel<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>
</blockquote></div><br><br clear="all"><br>-- <br>Sayontan Sinha<br><a href="http://mynethome.net" target="_blank">http://mynethome.net</a> | <a href="http://mynethome.net/blog" target="_blank">http://mynethome.net/blog</a><br>
--<br>Beating Australia in Cricket is like killing a celebrity. The death gets more coverage than the crime.<br><br>