<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: I'm making a plugin: how to include mootools only when necessary?</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: I'm making a plugin: how to include mootools only when necessary?</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 13:29:29 +0000</pubDate>

<item>
<title>mfields on "I'm making a plugin: how to include mootools only when necessary?"</title>
<link>http://wordpress.org/support/topic/236241#post-962319</link>
<pubDate>Wed, 21 Jan 2009 16:14:58 +0000</pubDate>
<dc:creator>mfields</dc:creator>
<guid isPermaLink="false">962319@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi.&#60;br /&#62;
I'm making a new plugin that incorporates &#60;a href=&#34;http://smoothgallery.jondesign.net/&#34;&#62;Smooth Gallery&#60;/a&#62;. If you are familiar with Smooth Gallery, it is a javascript apparatus built upon the prototype framework. I am just getting around to building the custom actions that will be used in theme/template pages when I ran into a question: &#34;How do I only include the mootools library on pages that use the action&#34;. &#60;/p&#62;
&#60;p&#62;I've been able to accomplish this in the wp-admin section rather easily by checking the value of &#60;code&#62;$_GET[&#38;#39;page&#38;#39;]&#60;/code&#62;, but I am lost as to how to go about this in the live blog. What I'd like to do is represented in pseudo code below&#34;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_wp_head(){
  if( $theme_file_uses_my_custom_action )
    wp_enqueue_scripts( &#38;#39;mootools&#38;#39; );
}
add_action( &#38;#39;wp_head&#38;#39;, &#38;#39;my_wp_head&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any thoughts here? I can't wrap my head around this one. Thanks in advance,&#60;br /&#62;
-Mike
&#60;/p&#62;</description>
</item>

</channel>
</rss>
