<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Best practice for adding JavaScript code to WordPress plugins</title> <atom:link href="http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/feed" rel="self" type="application/rss+xml" /><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin</link> <description>A blog by Prelovac Media CEO Vladimir Prelovac</description> <lastBuildDate>Tue, 14 Feb 2012 08:37:58 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Creating a Plugin &#124; PRABHNOOR.COM</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-24275</link> <dc:creator>Creating a Plugin &#124; PRABHNOOR.COM</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-24275</guid> <description>[...] support. See posts by the following people for more info: Ozh Richard, Artem Russakovskii, and Vladimir Prelovac.  VN:F [1.9.13_1145]Rating: 0 (from 0 votes)    Posted in Wordpress &#124; Tagged Create Plugin, [...]</description> <content:encoded><![CDATA[<p>[...] support. See posts by the following people for more info: Ozh Richard, Artem Russakovskii, and Vladimir Prelovac.  VN:F [1.9.13_1145]Rating: 0 (from 0 votes)    Posted in WordPress | Tagged Create Plugin, [...]</p> ]]></content:encoded> </item> <item><title>By: mohammed shomam</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-23791</link> <dc:creator>mohammed shomam</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-23791</guid> <description>Man... you rock! I had to pass a folder&#039;s path to my js file, and i was echoing it for assigning to a var, but then I was getting the very bad &#039;Headers already&#039; sent error... Your article saved me! Thanks a lot! http://methoo.com</description> <content:encoded><![CDATA[<p>Man... you rock! I had to pass a folder's path to my js file, and i was echoing it for assigning to a var, but then I was getting the very bad 'Headers already' sent error... Your article saved me! Thanks a lot! <a
href="http://methoo.com" rel="nofollow">http://methoo.com</a></p> ]]></content:encoded> </item> <item><title>By: My first plugin, Meteor Slides &#124; Josh Leuze</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-23683</link> <dc:creator>My first plugin, Meteor Slides &#124; Josh Leuze</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-23683</guid> <description>[...] Prelovac&#8217;s post on adding JavaScript code to plugins was a huge help, particularly for passing options on to my [...]</description> <content:encoded><![CDATA[<p>[...] Prelovac&#8217;s post on adding JavaScript code to plugins was a huge help, particularly for passing options on to my [...]</p> ]]></content:encoded> </item> <item><title>By: Writting a Wordpress plugin &#8211; Step by Step</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-23128</link> <dc:creator>Writting a Wordpress plugin &#8211; Step by Step</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-23128</guid> <description>[...] Try not to echo &lt;script&gt; and &lt;style&gt; tags directly &#8211; instead use the recommended wp_enqueue_style() and wp_enqueue_script() functions. They help eliminate including duplicate scripts and styles as well as introduce dependency support. See posts by the following people for more info: Ozh Richard, Artem Russakovskii, and Vladimir Prelovac. [...]</description> <content:encoded><![CDATA[<p>[...] Try not to echo &lt;script&gt; and &lt;style&gt; tags directly &#8211; instead use the recommended wp_enqueue_style() and wp_enqueue_script() functions. They help eliminate including duplicate scripts and styles as well as introduce dependency support. See posts by the following people for more info: Ozh Richard, Artem Russakovskii, and Vladimir Prelovac. [...]</p> ]]></content:encoded> </item> <item><title>By: The Need For Speed: 3 Wordpress Plugin Bad Boys &#124; WordPress Junkies</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-22595</link> <dc:creator>The Need For Speed: 3 Wordpress Plugin Bad Boys &#124; WordPress Junkies</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-22595</guid> <description>[...] By default WordPress adds javascript in your &lt;header&gt; tag. What&#8217;s so beautiful about this plugin is that it &#8220;will move all javascript code to the footer if the plugins have declared JavaScript properly.&#8221; [...]</description> <content:encoded><![CDATA[<p>[...] By default WordPress adds javascript in your &lt;header&gt; tag. What&#8217;s so beautiful about this plugin is that it &#8220;will move all javascript code to the footer if the plugins have declared JavaScript properly.&#8221; [...]</p> ]]></content:encoded> </item> <item><title>By: Desenvolvendo um plugin para WordPress Final &#124; Sr WordPress</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-22528</link> <dc:creator>Desenvolvendo um plugin para WordPress Final &#124; Sr WordPress</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-22528</guid> <description>[...] Tente não fazer echo tags &lt;script&gt; e &lt;style&gt; diretamente – ao invés disso tente usar as funções recomendadas wp_enqueue_style() e wp_enqueue_script(). Elas ajudam a eliminar a duplicação, incluindo scripts e estilos. Ver mais informações: Ozh Richardson, Artem Russakovskii, e Vladimir Prelovac. [...]</description> <content:encoded><![CDATA[<p>[...] Tente não fazer echo tags &lt;script&gt; e &lt;style&gt; diretamente – ao invés disso tente usar as funções recomendadas wp_enqueue_style() e wp_enqueue_script(). Elas ajudam a eliminar a duplicação, incluindo scripts e estilos. Ver mais informações: Ozh Richardson, Artem Russakovskii, e Vladimir Prelovac. [...]</p> ]]></content:encoded> </item> <item><title>By: Burhanuddin</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-22364</link> <dc:creator>Burhanuddin</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-22364</guid> <description>Its realy help me to make Spam task especially through admin page</description> <content:encoded><![CDATA[<p>Its realy help me to make Spam task especially through admin page</p> ]]></content:encoded> </item> <item><title>By: theWebalyst</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-21675</link> <dc:creator>theWebalyst</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-21675</guid> <description>I&#039;m trying to learn how to write a plugin well so this looks really valuable, but I can&#039;t find any reference to wp_print_action in the WordPress Codex.Is this post still valid?Thanks,Mark</description> <content:encoded><![CDATA[<p>I'm trying to learn how to write a plugin well so this looks really valuable, but I can't find any reference to wp_print_action in the WordPress Codex.</p><p>Is this post still valid?</p><p>Thanks,</p><p>Mark</p> ]]></content:encoded> </item> <item><title>By: Rutwick</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-21188</link> <dc:creator>Rutwick</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-21188</guid> <description>Man... you rock! I had to pass a folder&#039;s path to my js file, and i was echoing it for assigning to a var, but then I was getting the very bad &#039;Headers already&#039; sent error... Your article saved me! Thanks a lot!</description> <content:encoded><![CDATA[<p>Man... you rock! I had to pass a folder's path to my js file, and i was echoing it for assigning to a var, but then I was getting the very bad 'Headers already' sent error... Your article saved me! Thanks a lot!</p> ]]></content:encoded> </item> <item><title>By: CAP Marketer - Optimisez votre site internet développé sous Wordpress</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-20081</link> <dc:creator>CAP Marketer - Optimisez votre site internet développé sous Wordpress</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-20081</guid> <description>[...] placé en bas de page lorsque c’est possible. J’ai créé un plugin simple qui permet de déplacer correctement les fichiers Javascript en bas de page. Le plugin se nomme Footer [...]</description> <content:encoded><![CDATA[<p>[...] placé en bas de page lorsque c’est possible. J’ai créé un plugin simple qui permet de déplacer correctement les fichiers Javascript en bas de page. Le plugin se nomme Footer [...]</p> ]]></content:encoded> </item> <item><title>By: How to create a Wordpress plugin - the resources I used</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-2#comment-19821</link> <dc:creator>How to create a Wordpress plugin - the resources I used</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-19821</guid> <description>[...] I only wanted my plugin to appear on the front-end site, which meant I needed to learn how to exclude it from admin pages. [...]</description> <content:encoded><![CDATA[<p>[...] I only wanted my plugin to appear on the front-end site, which meant I needed to learn how to exclude it from admin pages. [...]</p> ]]></content:encoded> </item> <item><title>By: R'phael Spindel</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-1#comment-18457</link> <dc:creator>R'phael Spindel</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-18457</guid> <description>If conditionally passing objects into javascript with wp_localize_script, and to error proof your javascript, always check that the object is available to your javascript and defined before accessing it:if  ( !  ( &#039;undefined&#039; === typeof  WPWallSetting )  )
{
refresh = parseInt( WPWallSettings.refreshtime );
mode = WPWallSettings.mode;
}</description> <content:encoded><![CDATA[<p>If conditionally passing objects into javascript with wp_localize_script, and to error proof your javascript, always check that the object is available to your javascript and defined before accessing it:</p><p>if  ( !  ( 'undefined' === typeof  WPWallSetting )  )<br
/> {<br
/> refresh = parseInt( WPWallSettings.refreshtime );<br
/> mode = WPWallSettings.mode;<br
/> }</p> ]]></content:encoded> </item> <item><title>By: 10 great resources for WordPress developers &#124; Aliso the Geek</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-1#comment-18404</link> <dc:creator>10 great resources for WordPress developers &#124; Aliso the Geek</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-18404</guid> <description>[...] 4. Best practice for adding JavaScript code to WordPress plugins [...]</description> <content:encoded><![CDATA[<p>[...] 4. Best practice for adding JavaScript code to WordPress plugins [...]</p> ]]></content:encoded> </item> <item><title>By: Duke</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-1#comment-18258</link> <dc:creator>Duke</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-18258</guid> <description>Hello and thank you for this article :)
I was wondering if you could maybe provide further instructions for wp_localize_script, as there is no documentation of it that explains in details how to use, and it&#039;s not something you see often in plugins.
Thank you!</description> <content:encoded><![CDATA[<p>Hello and thank you for this article :)<br
/> I was wondering if you could maybe provide further instructions for wp_localize_script, as there is no documentation of it that explains in details how to use, and it's not something you see often in plugins.<br
/> Thank you!</p> ]]></content:encoded> </item> <item><title>By: 3 proper ways to customize your WordPress blog &#124; WebTechWise</title><link>http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin/comment-page-1#comment-17668</link> <dc:creator>3 proper ways to customize your WordPress blog &#124; WebTechWise</dc:creator> <pubDate></pubDate> <guid
isPermaLink="false">http://www.prelovac.com/vladimir/?p=820#comment-17668</guid> <description>[...] Too many plugins installed will eventually slow down your blog because many of them process and load javascript and css files in all pages, even the ones they are not used in. (too many is (roughly) &gt; 12, depends on each plugin performance and whether it&#8217;s built the right way). [...]</description> <content:encoded><![CDATA[<p>[...] Too many plugins installed will eventually slow down your blog because many of them process and load javascript and css files in all pages, even the ones they are not used in. (too many is (roughly) &gt; 12, depends on each plugin performance and whether it&#8217;s built the right way). [...]</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: www.prelovac.com @ 2012-02-14 11:27:25 by W3 Total Cache -->
