<?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: is_admin_page() for WordPress</title>
	<atom:link href="http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress</link>
	<description>Alex King, Denver Web Developer</description>
	<lastBuildDate>Wed, 23 May 2012 19:06:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: The Agony and Ecstasy - Creating a Wordpress Plugin &#124; mummey.org</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-66730</link>
		<dc:creator>The Agony and Ecstasy - Creating a Wordpress Plugin &#124; mummey.org</dc:creator>
		<pubDate>Fri, 13 Mar 2009 07:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-66730</guid>
		<description>[...] Wordpress has a really nice way to handle your plugin options, it provides some special hooks and takes care of all the database stuff for you which is really nice. There are a couple ways to hook into it, the route I used is to first check if the user is acutally in an admin page, I have this function, which is a modified one from here: [...]</description>
		<content:encoded><![CDATA[<p>[...] WordPress has a really nice way to handle your plugin options, it provides some special hooks and takes care of all the database stuff for you which is really nice. There are a couple ways to hook into it, the route I used is to first check if the user is acutally in an admin page, I have this function, which is a modified one from here: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-13787</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 13 Apr 2006 07:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-13787</guid>
		<description>Yes, I&#039;ve changed this to use the built-in function in new versions of my plugins.</description>
		<content:encoded><![CDATA[<p>Yes, I&#8217;ve changed this to use the built-in function in new versions of my plugins.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Huynh</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-13782</link>
		<dc:creator>Michael Huynh</dc:creator>
		<pubDate>Thu, 13 Apr 2006 06:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-13782</guid>
		<description>Hi Alex,

The recent upgrade to Wordpress 2.0.2 breaks the is_admin_page() function as you defined it above. &lt;a href=&quot;http://pascal.vanhecke.info/2006/03/18/wp-shortstat-plugin-broken-after-upgrading-to-wordpress-202/&quot;&gt;Pascal Van Hecke did a write up on his blog about this problem and suggested a solution&lt;/a&gt;.

Essentially, he replaced the check for &#039;check_admin_referer&#039; with a check for &#039;write_post&#039;.

Hope that helps!</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>The recent upgrade to WordPress 2.0.2 breaks the is_admin_page() function as you defined it above. <a href="http://pascal.vanhecke.info/2006/03/18/wp-shortstat-plugin-broken-after-upgrading-to-wordpress-202/">Pascal Van Hecke did a write up on his blog about this problem and suggested a solution</a>.</p>
<p>Essentially, he replaced the check for &#8216;check_admin_referer&#8217; with a check for &#8216;write_post&#8217;.</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alexking.org: Blog</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5450</link>
		<dc:creator>alexking.org: Blog</dc:creator>
		<pubDate>Fri, 27 May 2005 20:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5450</guid>
		<description>&lt;strong&gt;Popularity Contest Plugin (beta 3)&lt;/strong&gt;

I&#039;ve posted beta 3 of my Popularity Contest plugin. This release has 2 main changes:


	Don&#039;t do anything on admin pages - this should make post previews work again.
	The post path to update values should work when WordPress is installed in a sub...</description>
		<content:encoded><![CDATA[<p><strong>Popularity Contest Plugin (beta 3)</strong></p>
<p>I&#8217;ve posted beta 3 of my Popularity Contest plugin. This release has 2 main changes:</p>
<p>	Don&#8217;t do anything on admin pages &#8211; this should make post previews work again.<br />
	The post path to update values should work when WordPress is installed in a sub&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5436</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 25 May 2005 23:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5436</guid>
		<description>I was trying to make it extra readable, but very cute... you certain showed me.</description>
		<content:encoded><![CDATA[<p>I was trying to make it extra readable, but very cute&#8230; you certain showed me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joao Craveiro</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5435</link>
		<dc:creator>Joao Craveiro</dc:creator>
		<pubDate>Wed, 25 May 2005 23:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5435</guid>
		<description>if (something) then true else false?!?!?! How &#039;bout:

if (!function_exists(&#039;is_admin_page&#039;)) {
  function is_admin_page() {
    return (function_exists(â€™check_admin_refererâ€™));
  }
}

;)
</description>
		<content:encoded><![CDATA[<p>if (something) then true else false?!?!?! How &#8217;bout:</p>
<p>if (!function_exists(&#8216;is_admin_page&#8217;)) {<br />
  function is_admin_page() {<br />
    return (function_exists(â€™check_admin_refererâ€™));<br />
  }<br />
}</p>
<p> <img src='http://alexking.org/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5432</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 25 May 2005 20:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5432</guid>
		<description>Umm, as discussed in the post that was my first approach and we rejected it.</description>
		<content:encoded><![CDATA[<p>Umm, as discussed in the post that was my first approach and we rejected it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Skelton</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5431</link>
		<dc:creator>Andy Skelton</dc:creator>
		<pubDate>Wed, 25 May 2005 19:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5431</guid>
		<description>Or just use
strstr($_SERVER[â€™PHP_SELFâ€™], â€˜wp-admin/â€™)
like the core does.
(Sorry for three comments!)</description>
		<content:encoded><![CDATA[<p>Or just use<br />
strstr($_SERVER[â€™PHP_SELFâ€™], â€˜wp-admin/â€™)<br />
like the core does.<br />
(Sorry for three comments!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Skelton</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5430</link>
		<dc:creator>Andy Skelton</dc:creator>
		<pubDate>Wed, 25 May 2005 19:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5430</guid>
		<description>Oh, don&#039;t forget to
global $wp_query;
if it isn&#039;t already.</description>
		<content:encoded><![CDATA[<p>Oh, don&#8217;t forget to<br />
global $wp_query;<br />
if it isn&#8217;t already.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Skelton</title>
		<link>http://alexking.org/blog/2005/05/25/is_admin_page-for-wordpress#comment-5429</link>
		<dc:creator>Andy Skelton</dc:creator>
		<pubDate>Wed, 25 May 2005 19:52:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexking.org/blog/2005/05/25/is_admin_page-for-wordpress/#comment-5429</guid>
		<description>From classes.php:
if (strstr($_SERVER[&#039;PHP_SELF&#039;], &#039;wp-admin/&#039;)) {
	$this-&gt;is_admin = true;
}

So you can do this:
if (!$wp_query-&gt;is_admin) {
// do stuff you can&#039;t do in wp-admin
}

I think so, anyway :)</description>
		<content:encoded><![CDATA[<p>From classes.php:<br />
if (strstr($_SERVER['PHP_SELF'], &#8216;wp-admin/&#8217;)) {<br />
	$this-&gt;is_admin = true;<br />
}</p>
<p>So you can do this:<br />
if (!$wp_query-&gt;is_admin) {<br />
// do stuff you can&#8217;t do in wp-admin<br />
}</p>
<p>I think so, anyway <img src='http://alexking.org/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

