<?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: WordPress: Working With Options</title>
	<atom:link href="http://wpengineer.com/wordpress-working-with-options/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com/wordpress-working-with-options/</link>
	<description>WordPress News, Hacks, Tipps, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Wed, 17 Mar 2010 18:25:06 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Darío Ferrer</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3338</link>
		<dc:creator>Darío Ferrer</dc:creator>
		<pubDate>Sat, 23 Jan 2010 15:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3338</guid>
		<description>Sorry krillo, the above code is wrong, this is the right

$args = $wpdb-&gt;get_results( bla bla bla...
$options = maybe_unserialize( $args-&gt;option_value );

Then you can use it in this way:

echo $options[&#039;your_array_element&#039;];</description>
		<content:encoded><![CDATA[<p>Sorry krillo, the above code is wrong, this is the right</p>
<p>$args = $wpdb-&gt;get_results( bla bla bla...<br />
$options = maybe_unserialize( $args-&gt;option_value );</p>
<p>Then you can use it in this way:</p>
<p>echo $options['your_array_element'];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darío Ferrer</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3337</link>
		<dc:creator>Darío Ferrer</dc:creator>
		<pubDate>Sat, 23 Jan 2010 15:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3337</guid>
		<description>krillo,

$args = $wpdb-&gt;get_results( bla bla bla...
$args = maybe_unserialize( $args );</description>
		<content:encoded><![CDATA[<p>krillo,</p>
<p>$args = $wpdb-&gt;get_results( bla bla bla...<br />
$args = maybe_unserialize( $args );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krillo</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3203</link>
		<dc:creator>krillo</dc:creator>
		<pubDate>Tue, 05 Jan 2010 12:18:46 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3203</guid>
		<description>Hey, good info. 
It gave me the clue how to read wp_options values  from one wpmu blog to another. This is how i did it:
&lt;pre&gt;
    global $wpdb;
    $args = $wpdb-&gt;get_results(&quot;select * from wp_6_options where option_name = &#039;widget_zmags_thumb&#039;&quot;);
    $options = $args[0]-&gt;option_value;
    $zmags = maybe_unserialize($options);
&lt;/pre&gt;
Where I used maybe_unserialize() from wp-includes/functions.php to unserialize the data to an array.
Cheers!</description>
		<content:encoded><![CDATA[<p>Hey, good info.<br />
It gave me the clue how to read wp_options values  from one wpmu blog to another. This is how i did it:</p>
<pre>
    global $wpdb;
    $args = $wpdb-&gt;get_results("select * from wp_6_options where option_name = 'widget_zmags_thumb'");
    $options = $args[0]-&gt;option_value;
    $zmags = maybe_unserialize($options);
</pre>
<p>Where I used maybe_unserialize() from wp-includes/functions.php to unserialize the data to an array.<br />
Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajay</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3112</link>
		<dc:creator>Ajay</dc:creator>
		<pubDate>Tue, 22 Dec 2009 15:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3112</guid>
		<description>How do you implement this with WordPress themes? The tutorial I followed adds a separate row for each option!</description>
		<content:encoded><![CDATA[<p>How do you implement this with WordPress themes? The tutorial I followed adds a separate row for each option!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dario Ferrer</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3042</link>
		<dc:creator>Dario Ferrer</dc:creator>
		<pubDate>Sat, 19 Dec 2009 00:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3042</guid>
		<description>Well, I solved the issue with some conditionals on data (before send it to DB), but I&#039;m still curious about some direct hook which allows delete (or at least set to 0) an array element placed into some option.</description>
		<content:encoded><![CDATA[<p>Well, I solved the issue with some conditionals on data (before send it to DB), but I'm still curious about some direct hook which allows delete (or at least set to 0) an array element placed into some option.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dario Ferrer</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3027</link>
		<dc:creator>Dario Ferrer</dc:creator>
		<pubDate>Fri, 18 Dec 2009 11:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3027</guid>
		<description>I wish to set the param2 to 0, or better, delete it. But &quot;0&quot; is fine also. Thanks.</description>
		<content:encoded><![CDATA[<p>I wish to set the param2 to 0, or better, delete it. But "0" is fine also. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3026</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 18 Dec 2009 11:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3026</guid>
		<description>Dario, depends on what you need. Override the array or object with a new one and update_otions. Or set the value of the param2 to &#039;&#039; or 0.</description>
		<content:encoded><![CDATA[<p>Dario, depends on what you need. Override the array or object with a new one and update_otions. Or set the value of the param2 to '' or 0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dario Ferrer</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-3025</link>
		<dc:creator>Dario Ferrer</dc:creator>
		<pubDate>Fri, 18 Dec 2009 11:11:24 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-3025</guid>
		<description>Great post. Handling data as objects is an excellent method. However I think the &quot;add_option&quot; hook can be replaced with &quot;update_option&quot;, which also can creates new fields.

By the way I have a question ¿how to delete only one of those elements, e.g. &quot;param2&quot;?. At this moment I&#039;m some stucked with this issue.</description>
		<content:encoded><![CDATA[<p>Great post. Handling data as objects is an excellent method. However I think the "add_option" hook can be replaced with "update_option", which also can creates new fields.</p>
<p>By the way I have a question ¿how to delete only one of those elements, e.g. "param2"?. At this moment I'm some stucked with this issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theme Uninstaller - WordPress, Options, Datenbank - dynamicinternet</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-2940</link>
		<dc:creator>Theme Uninstaller - WordPress, Options, Datenbank - dynamicinternet</dc:creator>
		<pubDate>Sat, 05 Dec 2009 08:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-2940</guid>
		<description>[...] Diejenigen, die immer noch jede einzelne Option separat speichern, m&#252;ssen die Zeile delete_option(&#039;your_theme_options&#039;) selbstverst&#228;ndlich entsprechend erweitern.  Daher gilt, besser die Einstellungen in einem Array oder Objekt zu speichern und performanter zu arbeiten. Weitere Hintergr&#252;nde gibt es im Beitrag WordPress: Working With Options [...]</description>
		<content:encoded><![CDATA[<p>[...] Diejenigen, die immer noch jede einzelne Option separat speichern, m&#252;ssen die Zeile delete_option(&#39;your_theme_options&#39;) selbstverst&#228;ndlich entsprechend erweitern.  Daher gilt, besser die Einstellungen in einem Array oder Objekt zu speichern und performanter zu arbeiten. Weitere Hintergr&#252;nde gibt es im Beitrag WordPress: Working With Options [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-900</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 27 Mar 2009 21:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-900</guid>
		<description>Ozh, you mean the set_/get_transient stuff?
I think, many plugin authors should learn first to use one tablerow instead of 60. Than we can write about set_transient :P</description>
		<content:encoded><![CDATA[<p>Ozh, you mean the set_/get_transient stuff?<br />
I think, many plugin authors should learn first to use one tablerow instead of 60. Than we can write about set_transient <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ozh</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-899</link>
		<dc:creator>Ozh</dc:creator>
		<pubDate>Fri, 27 Mar 2009 21:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-899</guid>
		<description>Nice article for beginners.
But I was expecting something about how you need to register options for 2.8 :)</description>
		<content:encoded><![CDATA[<p>Nice article for beginners.<br />
But I was expecting something about how you need to register options for 2.8 <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kubi</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-897</link>
		<dc:creator>kubi</dc:creator>
		<pubDate>Fri, 27 Mar 2009 15:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-897</guid>
		<description>Thanks! I always thought that i have to do serialize and unserialize, but good to know that wordpress does handle that for me.</description>
		<content:encoded><![CDATA[<p>Thanks! I always thought that i have to do serialize and unserialize, but good to know that wordpress does handle that for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-896</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 27 Mar 2009 14:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-896</guid>
		<description>Ahh.. Brilliant.  Wordpress strikes again!</description>
		<content:encoded><![CDATA[<p>Ahh.. Brilliant.  Wordpress strikes again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-895</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 27 Mar 2009 13:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-895</guid>
		<description>Thanks Alex :)

Peter, WordPress does the job for you. add_option and update_option calls internal maybe_serialize().
See function maybe_serialize() in wp-includes/functions.php at line 801.</description>
		<content:encoded><![CDATA[<p>Thanks Alex <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Peter, WordPress does the job for you. add_option and update_option calls internal maybe_serialize().<br />
See function maybe_serialize() in wp-includes/functions.php at line 801.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-894</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 27 Mar 2009 13:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-894</guid>
		<description>I always assumed that both arrays and objects needed to be explicitly serialized (with serialize()) before they were stored in a database.  Is this not the case?  Does wordpress do this for you with add_option, or is it just unneccesary all together?

Obviously I need to do some reading on the subject...</description>
		<content:encoded><![CDATA[<p>I always assumed that both arrays and objects needed to be explicitly serialized (with serialize()) before they were stored in a database.  Is this not the case?  Does wordpress do this for you with add_option, or is it just unneccesary all together?</p>
<p>Obviously I need to do some reading on the subject...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://wpengineer.com/wordpress-working-with-options/#comment-893</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 27 Mar 2009 12:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=968#comment-893</guid>
		<description>Great article guys! This is something I&#039;ve been needing to know about for a while.</description>
		<content:encoded><![CDATA[<p>Great article guys! This is something I've been needing to know about for a while.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
