<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HiddenTao &#187; PHP-in-Posts</title>
	<atom:link href="http://www.hiddentao.com/archives/tag/php-in-posts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hiddentao.com</link>
	<description>software, websites, mobile, technology</description>
	<lastBuildDate>Mon, 30 Aug 2010 21:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>PHP-in-Posts</title>
		<link>http://www.hiddentao.com/code/wordpress-php-in-posts-plugin/</link>
		<comments>http://www.hiddentao.com/code/wordpress-php-in-posts-plugin/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 17:21:18 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP-in-Posts]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.hiddentao.net/projects/wordpress-php-in-posts-plugin/</guid>
		<description><![CDATA[PHP-in-Posts is a WordPress plugin which allows you to include PHP code within your blog entries &#8211; this includes blog posts, comments and pages. The PHP code gets executed and the resulting output (if any) gets included in the post&#8217;s content. On the plugin options page you can specify the minimum user permission level required [...]]]></description>
			<content:encoded><![CDATA[<p>PHP-in-Posts is a <a href="http://www.wordpress.org/" title="Goto WordPress homepage" class="liwp">WordPress</a> plugin which allows you to include PHP code within your blog entries &#8211; this includes blog posts, comments and pages. The PHP code gets executed and the resulting output (if any) gets included in the post&#8217;s content. On the plugin options page you can specify the minimum user permission level required in order to use PHP code within a post.</p>

<p>This plugin requires at least WordPress 2.3. It has been tested on upto WordPress 2.9.</p>

<p>License: <a href="http://www.gnu.org/licenses/gpl.txt" title="GNU General Public License" class="link-external">GPL 3</a>.</p>

<p>Current version: 0.2</p>

<p>Skip to:
<span class="spaced_out"><a href="#installation" class="liinternal">Installation</a></span>
<span class="spaced_out"><a href="#syntax" class="liinternal">Syntax</a></span>
<span class="spaced_out"><a href="#options" class="liinternal">Options</a></span>
<span class="spaced_out"><a href="#changelog" class="liinternal">Changelog</a></span></p>

<form class='donate' method='post' action='https://www.paypal.com/cgi-bin/webscr'>		<input type='hidden' value='' name='amount'/>		<input type='hidden' value='_xclick' name='cmd'/>		<input type='hidden' value='paypal_donations@hiddentao.com' name='business'/>		<input type='hidden' value='Support PHP-in-Posts with a donation' name='item_name'/>		<input type='hidden' value='1' name='no_shipping'/>		<input type='hidden' value='http://www.hiddentao.com/about/thank-you-for-your-donation/' name='return'/>		<input type='hidden' value='http://www.hiddentao.com' name='cancel_return'/>		<input type='hidden' value='GBP' name='currency_code'/>		<input type='hidden' value='' name='page_style'/>		<input type='hidden' value='0' name='tax'/>		<input type='image' alt='PayPal - The safer, easier way to pay online' name='submit' style='border: 0pt none ;' src='http://www.hiddentao.com/images/icons/donate_paypal.png' title='Support PHP-in-Posts with a donation'/></form>

<h2 id="installation">Installation</h2>

<ol>
<li><a href="http://www.hiddentao.com/downloads/wordpress-php-in-posts-plugin-0.2.zip" class="lizip">Download PHP-in-Posts</a>.</li>
<li>Unzip it into your WordPress <code>plugins</code> folder such that the plugin files are at: <code>wp-content/plugins/php-in-posts/...</code></li>
<li>Enable the plugin within your blog&#8217;s administration options.</li>
<li>All done!</li>
</ol>

<h2 id="syntax">Syntax</h2>

<p>To include PHP code within your posts, simply wrap the code within a &#91;php&#93; tag. For example, the following entry&#8230;</p>

<p><pre>
This is the year &#91;php&#93;echo date('Y');&#91;/php&#93;.
</pre></p>

<p>&#8230;will produce&#8230;</p>

<p><pre>
This is the year 2010.
</pre></p>

<p>You can even include code which spans multiple lines. For example, the following entry&#8230;</p>

<p><pre>
&#91;php&#93;
echo 'Your IP address is ';
echo $_SERVER['REMOTE_ADDR'];
&#91;/php&#93;
</pre></p>

<p>&#8230;will produce&#8230;</p>

<p><pre>
Your IP address is 38.107.191.90
</pre></p>

<p>Additionally, if you simply wish to echo the value of a <code>global</code> variable or constant there is a short-hand format you can use. For example, the following entry&#8230;</p>

<p><pre>
The database for this blog resides on &#91;php:DB_HOST&#93;.
</pre></p>

<p>&#8230;will produce&#8230;</p>

<p><pre>
The database for this blog resides on localhost.
</pre></p>

<p>Pre-defined global variables &#8211; e.g. <code>$_SERVER[..]</code> are not currently supported in this short-hand syntax.</p>

<h2 id="options">Options</h2>

<p>On the PHP-in-Posts options page in the administration interface you can set the minimum user level required to include PHP code in entries. If a user&#8217;s level doesn&#8217;t meet the minimum value then the PHP-in-Posts plug-in will not process their entries.</p>

<p>Since allowing users to execute arbitrary PHP code within their entries is potentially dangerous, the default level is set to the highest value according to the available user roles (usually &#8216;Administrator&#8217;).</p>

<h2 id="changelog">Changelog</h2>

<ul>
<li>Version 0.2 (Mar 31, 2008)

<ul>
<li>Made sure it works in WordPress 2.5</li>
</ul></li>
<li>Version 0.1 (Nov 17, 2007) &#8211; the initial release.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/code/wordpress-php-in-posts-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
