<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Themes should not deregister core provided scripts. I
agree. *however* deregistering their own scripts is
okay. I do that in several child themes to make changes to the
menubar .js </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title=georgemamadashvili@gmail.com
href="mailto:georgemamadashvili@gmail.com">George Mamadashvili</A> </DIV>
<DIV><B>Sent:</B> Thursday, May 31, 2012 12:02 AM</DIV>
<DIV><B>To:</B> <A title=theme-reviewers@lists.wordpress.org
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</A>
</DIV>
<DIV><B>Subject:</B> Re: [theme-reviewers] jQuery</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">I
think themes shouldn't use wp_deregister_script(). In most cases it's used for
deregistering jQuery. Providing jQuery and other JS libraries from CDN, I think
is plugin territory. <BR><BR>
<DIV class=gmail_quote>On Thu, May 31, 2012 at 7:12 AM, Emil Uzelac <SPAN
dir=ltr><<A href="mailto:emil@themeid.com"
target=_blank>emil@themeid.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><FONT color=#333333><FONT
face=arial,helvetica,sans-serif>Even with multiple libraries
wp_deregister_script is not needed. With e.g. wp_enqueue_script('my-script',
get_template_directory_uri() . '/js/my-script.js', array('jquery'), '1.0.0',
true); you can enqueue as many JS as you want, without conflicts, what you
already know. Now just like PHP JS can be overridden with another e.g.
my-custom-fancybox as well, so you don't need to deregister. This applies only
to WPORG, you can do whatever you please on your site, which doesn't really
apply to this topic anyways :) Quick example </FONT></FONT><FONT color=#333333
face="arial, helvetica, sans-serif"><A
href="http://stackoverflow.com/questions/296667/overriding-a-javascript-function-while-referencing-the-original"
target=_blank>http://stackoverflow.com/questions/296667/overriding-a-javascript-function-while-referencing-the-original</A></FONT><SPAN
class=HOEnZb><FONT color=#888888>
<DIV><FONT color=#333333
face="arial, helvetica, sans-serif"><BR></FONT></DIV></FONT></SPAN>
<DIV><SPAN class=HOEnZb><FONT color=#888888><FONT color=#333333
face="arial, helvetica, sans-serif">Emil<BR></FONT></FONT></SPAN>
<DIV>
<DIV class=h5>
<DIV><FONT color=#333333><FONT
face=arial,helvetica,sans-serif><BR></FONT></FONT></DIV>
<DIV><FONT color=#333333><FONT
face=arial,helvetica,sans-serif><BR></FONT></FONT><BR>
<DIV class=gmail_quote>On Wed, May 30, 2012 at 5:00 PM, Sayontan Sinha <SPAN
dir=ltr><<A href="mailto:sayontan@gmail.com"
target=_blank>sayontan@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>My only question: is there *ever* a legitimate use of
wp_deregister_script()?<BR></BLOCKQUOTE><BR></DIV>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 wp_deregister_script.<BR><BR>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.<BR><BR>Sayontan.
<DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On Wed, May 30, 2012 at 2:48 PM, Chip Bennett <SPAN
dir=ltr><<A href="mailto:chip@chipbennett.net"
target=_blank>chip@chipbennett.net</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>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.
<DIV> </DIV>
<DIV>Chip</DIV>
<DIV>
<DIV> </DIV>
<DIV class=gmail_quote>On Wed, May 30, 2012 at 4:33 PM, esmi at quirm dot
net <SPAN dir=ltr><<A href="mailto:esmi@quirm.net"
target=_blank>esmi@quirm.net</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>on 30/05/2012 22:01 Emil Uzelac said the
following:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Also see:<BR><A
href="http://wpdevel.wordpress.com/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/"
target=_blank>http://wpdevel.wordpress.com/<U></U>2011/12/12/use-wp_enqueue_<U></U>scripts-not-wp_print_styles-<U></U>to-enqueue-scripts-and-styles-<U></U>for-the-frontend/</A><BR></BLOCKQUOTE><BR>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?
<DIV>
<DIV><BR><BR>Mel<SPAN><FONT color=#888888><BR>-- <BR><A
href="http://quirm.net" target=_blank>http://quirm.net</A><BR><A
href="http://blackwidows.co.uk"
target=_blank>http://blackwidows.co.uk</A><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></FONT></SPAN></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR></DIV></DIV><SPAN><FONT color=#888888>-- <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></FONT></SPAN><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A href="mailto:theme-reviewers@lists.wordpress.org"
target=_blank>theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>theme-reviewers
mailing list<BR><A
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</A><BR><A
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target=_blank>http://lists.wordpress.org/mailman/listinfo/theme-reviewers</A><BR><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
_______________________________________________<BR>theme-reviewers mailing
list<BR>theme-reviewers@lists.wordpress.org<BR>http://lists.wordpress.org/mailman/listinfo/theme-reviewers<BR></DIV></DIV></DIV></BODY></HTML>