<?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: Handling Plugins Options in WordPress 2.8 with register_setting()</title>
	<atom:link href="http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/?source=rss</link>
	<description>A bit of my personal life, mainly focused on my kids. A bit of code, mainly focused on Wordpress and PHP. Overall, bits of nothing in particular.</description>
	<lastBuildDate>Wed, 23 May 2012 13:43:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Yasen Vasilev</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-197414</link>
		<dc:creator>Yasen Vasilev</dc:creator>
		<pubDate>Fri, 23 Dec 2011 15:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-197414</guid>
		<description>Cool! But I think I&#039;m doing something wrong. What if I don&#039;t use wp_options, but my own table? What code should I use to get the possibility to write in that table from the settings page? I tried the global wpdb and SQL query in the settings page, but it crashes?</description>
		<content:encoded><![CDATA[<p>Cool! But I think I&#8217;m doing something wrong. What if I don&#8217;t use wp_options, but my own table? What code should I use to get the possibility to write in that table from the settings page? I tried the global wpdb and SQL query in the settings page, but it crashes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Smrth</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-197065</link>
		<dc:creator>Smrth</dc:creator>
		<pubDate>Tue, 25 Oct 2011 08:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-197065</guid>
		<description>how would you validate if given is number between 1 and 600?</description>
		<content:encoded><![CDATA[<p>how would you validate if given is number between 1 and 600?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-197063</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Sun, 23 Oct 2011 22:07:39 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-197063</guid>
		<description>sorry you can ignore that.. the \n&#039;s come from using error_log (if I just echo the individual array elements, there&#039;s no carriage)..

is_int still doesn&#039;t work, but is_numeric returns the correct answer so I&#039;ll use that.</description>
		<content:encoded><![CDATA[<p>sorry you can ignore that.. the \n&#8217;s come from using error_log (if I just echo the individual array elements, there&#8217;s no carriage)..</p>
<p>is_int still doesn&#8217;t work, but is_numeric returns the correct answer so I&#8217;ll use that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-197062</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Sun, 23 Oct 2011 20:13:07 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-197062</guid>
		<description>Ozh, I was wondering if you&#039;d ever encounter this situation. 
Simply, that in your admin settings page validation function, somehow there is a carriage return (slash and an N) tagged to the end of every value.   

So when I test for an is_int, it never returns true.. because there&#039;s actually a 2carriagereturn, not 2.

I did a  error_log(print_r($input,true)) to see what was going on.</description>
		<content:encoded><![CDATA[<p>Ozh, I was wondering if you&#8217;d ever encounter this situation.<br />
Simply, that in your admin settings page validation function, somehow there is a carriage return (slash and an N) tagged to the end of every value.   </p>
<p>So when I test for an is_int, it never returns true.. because there&#8217;s actually a 2carriagereturn, not 2.</p>
<p>I did a  error_log(print_r($input,true)) to see what was going on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GB</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-196957</link>
		<dc:creator>GB</dc:creator>
		<pubDate>Tue, 04 Oct 2011 20:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-196957</guid>
		<description>Thx - clear article.

I am using 
&lt;?php wp_nonce_field(&#039;update-options&#039;);
and a hidden field with the name &quot;page_options&quot; - the 2.7 way for backwards compatibility.

And escaping my input values.

Any thoughts on a better way to do this and still keep 2.x compatibility?</description>
		<content:encoded><![CDATA[<p>Thx &#8211; clear article.</p>
<p>I am using<br />
&lt;?php wp_nonce_field(&#039;update-options&#039;);<br />
and a hidden field with the name &quot;page_options&quot; &#8211; the 2.7 way for backwards compatibility.</p>
<p>And escaping my input values.</p>
<p>Any thoughts on a better way to do this and still keep 2.x compatibility?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-175800</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 02 Aug 2011 20:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-175800</guid>
		<description>This helped me a ton, since I got nowhere with the code from the wordpress.org documentation. Not sure what&#039;s up with that, but thank you!</description>
		<content:encoded><![CDATA[<p>This helped me a ton, since I got nowhere with the code from the wordpress.org documentation. Not sure what&#8217;s up with that, but thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juergen</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-163442</link>
		<dc:creator>Juergen</dc:creator>
		<pubDate>Mon, 13 Jun 2011 14:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-163442</guid>
		<description>Hello, Nabha,
thanks for the hint.</description>
		<content:encoded><![CDATA[<p>Hello, Nabha,<br />
thanks for the hint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nabha</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-163433</link>
		<dc:creator>Nabha</dc:creator>
		<pubDate>Mon, 13 Jun 2011 13:55:35 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-163433</guid>
		<description>Jurgen, you want to use add_settings_error() for that. (Just discovered it in Professional WordPress Plugin Development, in Chapter 7, in the section on the settings API.)

This page has a little documentation on it:
http://hitchhackerguide.com/2011/02/11/add_settings_error/</description>
		<content:encoded><![CDATA[<p>Jurgen, you want to use add_settings_error() for that. (Just discovered it in Professional WordPress Plugin Development, in Chapter 7, in the section on the settings API.)</p>
<p>This page has a little documentation on it:<br />
<a href="http://hitchhackerguide.com/2011/02/11/add_settings_error/" rel="nofollow">http://hitchhackerguide.com/2011/02/11/add_settings_error/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jürgen</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-152923</link>
		<dc:creator>Jürgen</dc:creator>
		<pubDate>Wed, 27 Apr 2011 13:42:38 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-152923</guid>
		<description>Hello,
thanks for your advice on this topic.
But there is still on question left:
How to I report the user about invalid input values?
It&#039;s ok to use the sanitize function, but this will not give feedback on errors.
Or did I miss something?</description>
		<content:encoded><![CDATA[<p>Hello,<br />
thanks for your advice on this topic.<br />
But there is still on question left:<br />
How to I report the user about invalid input values?<br />
It&#8217;s ok to use the sanitize function, but this will not give feedback on errors.<br />
Or did I miss something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Turner</title>
		<link>http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/comment-page-2/#comment-150573</link>
		<dc:creator>Greg Turner</dc:creator>
		<pubDate>Thu, 14 Apr 2011 03:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://planetozh.com/blog/?p=1241#comment-150573</guid>
		<description>Thank you very much for this article.  Quick question about something.  The register_settings and add_settings_xx calls are all made in a function that is attached to the admin_init hook.  The codex says this hook &quot;Runs at the beginning of every admin page before the page is rendered.&quot;  From this I conclude these calls are being made multiple times, whenever the admin page is rendered.  Which does not make sense.  Seems to me, these calls only need to be made once, perhaps in the register_activation_hook function.  What am I missing?  Thanks again.</description>
		<content:encoded><![CDATA[<p>Thank you very much for this article.  Quick question about something.  The register_settings and add_settings_xx calls are all made in a function that is attached to the admin_init hook.  The codex says this hook &#8220;Runs at the beginning of every admin page before the page is rendered.&#8221;  From this I conclude these calls are being made multiple times, whenever the admin page is rendered.  Which does not make sense.  Seems to me, these calls only need to be made once, perhaps in the register_activation_hook function.  What am I missing?  Thanks again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

