<?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: Safe Function Call v1.0</title>
	<atom:link href="http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/feed/" rel="self" type="application/rss+xml" />
	<link>http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/</link>
	<description>pro-gram-mer: n. a person who converts coffee into code</description>
	<pubDate>Wed, 07 Jan 2009 19:37:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott</title>
		<link>http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/comment-page-1/#comment-409614</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 30 May 2008 21:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/#comment-409614</guid>
		<description>This functions provided by this plugin don't control if/when/how other functions are called or used.  It only protects against the function not being available.  For instance, if you had a plugin that provided the function &lt;code&gt;todays_weather()&lt;/code&gt; and you activated the plugin and put that code into your sidebar, eveything would be fine.  If you then deactivate the plugin, your site will throw an error because &lt;code&gt;todays_weather()&lt;/code&gt; no longer exists.  If you had wrapped that call in a &lt;b&gt;Safe Function Call&lt;/b&gt;, you would've protected yourself from the error, i.e. &lt;code&gt;&lt;?php _sfc('todays_weather'); ?&gt;&lt;/code&gt;.

For what you're describing, you probably just want to use built-in WordPress functions to do what you want, i.e.
&lt;code&gt;
  if( is_page('about') ) {
    todays_weather();
  }
&lt;/code&gt;

That code will only call todays_weather() if it is being viewed on the WP page with the name "about".</description>
		<content:encoded><![CDATA[<p>This functions provided by this plugin don&#8217;t control if/when/how other functions are called or used.  It only protects against the function not being available.  For instance, if you had a plugin that provided the function <code>todays_weather()</code> and you activated the plugin and put that code into your sidebar, eveything would be fine.  If you then deactivate the plugin, your site will throw an error because <code>todays_weather()</code> no longer exists.  If you had wrapped that call in a <b>Safe Function Call</b>, you would&#8217;ve protected yourself from the error, i.e. <code>&lt;?php _sfc(&#039;todays_weather&#039;); ?&gt;</code>.</p>
<p>For what you&#8217;re describing, you probably just want to use built-in WordPress functions to do what you want, i.e.<br />
<pre><code>
  if( is_page(&#039;about&#039;) ) {
    todays_weather();
  }
</code></pre></p>
<p>That code will only call todays_weather() if it is being viewed on the WP page with the name &#8220;about&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/comment-page-1/#comment-409572</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 30 May 2008 16:10:10 +0000</pubDate>
		<guid isPermaLink="false">http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/#comment-409572</guid>
		<description>I'm trying to wrap my brain around this. Say I have a plugin I only need for a specific page templates, but prefer not to have it dump extra code in the head on all the other pages that don't need the activated plugin. Would this be an appropriate use of Safe Function Call to pull in functions just for that template?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to wrap my brain around this. Say I have a plugin I only need for a specific page templates, but prefer not to have it dump extra code in the head on all the other pages that don&#8217;t need the activated plugin. Would this be an appropriate use of Safe Function Call to pull in functions just for that template?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Reilly: Two Weeks of WordPress Plugin Releases and Updates &#171; Lorelle on WordPress</title>
		<link>http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/comment-page-1/#comment-383996</link>
		<dc:creator>Scott Reilly: Two Weeks of WordPress Plugin Releases and Updates &#171; Lorelle on WordPress</dc:creator>
		<pubDate>Mon, 07 Apr 2008 04:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://coffee2code.com/archives/2008/04/04/safe-function-call-v10/#comment-383996</guid>
		<description>[...] Safe Function Call v1.0: Offers the ability to safely call functions not normally available from within a template, such as calling a function provided by a deactivated WordPress Plugin - great for intermediate to advanced WordPress users who like pushing the envelop with their WordPress blogs. [...]</description>
		<content:encoded><![CDATA[<p>[...] Safe Function Call v1.0: Offers the ability to safely call functions not normally available from within a template, such as calling a function provided by a deactivated WordPress Plugin - great for intermediate to advanced WordPress users who like pushing the envelop with their WordPress blogs. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
