<?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: Set options on activation Themes</title> <atom:link href="http://wpengineer.com/set-options-on-activation-themes/feed/" rel="self" type="application/rss+xml" /><link>http://wpengineer.com/set-options-on-activation-themes/</link> <description>WordPress News, Hacks, Tipps, Tutorials, Plugins and Themes</description> <lastBuildDate>Thu, 29 Jul 2010 08:11:47 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=4445</generator> <item><title>By: Michael</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-4636</link> <dc:creator>Michael</dc:creator> <pubDate>Thu, 08 Jul 2010 21:31:57 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-4636</guid> <description>@Dion Hulse:Thanks for the tip!</description> <content:encoded><![CDATA[<p>@Dion Hulse:Thanks for the tip!</p> ]]></content:encoded> </item> <item><title>By: Dion Hulse (dd32)</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-4632</link> <dc:creator>Dion Hulse (dd32)</dc:creator> <pubDate>Thu, 08 Jul 2010 08:02:41 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-4632</guid> <description>You can also get a deactivation hook by catching the user switching the theme, For example, i used this in some code a long time ago:&lt;code&gt;
add_action(&#039;switch_theme&#039;, &#039;theme_deactivate&#039;);
function theme_deactivate(){
delete_option(&#039;my_options_that_dont_matter&#039;);
}
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>You can also get a deactivation hook by catching the user switching the theme, For example, i used this in some code a long time ago:</p><p><code><br
/> add_action('switch_theme', 'theme_deactivate');<br
/> function theme_deactivate(){<br
/> delete_option('my_options_that_dont_matter');<br
/> }<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: Jeff Ballweg</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-4607</link> <dc:creator>Jeff Ballweg</dc:creator> <pubDate>Fri, 02 Jul 2010 02:58:32 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-4607</guid> <description>Just implementing the same workaround right now... has a formal activation hook been added in WP3.0? - I found &lt;a href=&quot;http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html#a25211004&quot; rel=&quot;nofollow&quot;&gt; a thread on nabble &lt;/a&gt; from about a year ago that seems to indicate that there still isn&#039;t one in the core.</description> <content:encoded><![CDATA[<p>Just implementing the same workaround right now... has a formal activation hook been added in WP3.0? - I found <a
href="http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html#a25211004" rel="nofollow" class="liexternal"> a thread on nabble </a> from about a year ago that seems to indicate that there still isn't one in the core.</p> ]]></content:encoded> </item> <item><title>By: Philip</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-4514</link> <dc:creator>Philip</dc:creator> <pubDate>Thu, 17 Jun 2010 16:02:11 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-4514</guid> <description>thanks a lot Michael,i have search in the options.php page and i can&#039;t find any information about categories and pages,i  think i have to do something different,but thanks a lot for your help</description> <content:encoded><![CDATA[<p>thanks a lot Michael,</p><p>i have search in the options.php page and i can't find any information about categories and pages,</p><p>i  think i have to do something different,</p><p>but thanks a lot for your help</p> ]]></content:encoded> </item> <item><title>By: Michael</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-4513</link> <dc:creator>Michael</dc:creator> <pubDate>Thu, 17 Jun 2010 15:44:08 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-4513</guid> <description>@philip: maybe this one will help &lt;a href=&quot;http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/&lt;/a&gt;</description> <content:encoded><![CDATA[<p>@philip: maybe this one will help <a
href="http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/" rel="nofollow" class="liinternal">http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/</a></p> ]]></content:encoded> </item> <item><title>By: philip</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-4512</link> <dc:creator>philip</dc:creator> <pubDate>Thu, 17 Jun 2010 15:27:49 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-4512</guid> <description>thanks a lot for this,
can i ask if someone here knows how to pre-add some pages and categories after theme activation?thanks a lot for your help!</description> <content:encoded><![CDATA[<p>thanks a lot for this,<br
/> can i ask if someone here knows how to pre-add some pages and categories after theme activation?</p><p>thanks a lot for your help!</p> ]]></content:encoded> </item> <item><title>By: Keith</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-3663</link> <dc:creator>Keith</dc:creator> <pubDate>Mon, 08 Mar 2010 21:33:36 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-3663</guid> <description>Thanks for publishing. I was looking for a good work around for the lack of an activation hook for themes.David,To avoid overwriting, a better approach may be to use add_option instead of update_option as add_option will not overwrite if a value already exists.</description> <content:encoded><![CDATA[<p>Thanks for publishing. I was looking for a good work around for the lack of an activation hook for themes.</p><p>David,</p><p>To avoid overwriting, a better approach may be to use add_option instead of update_option as add_option will not overwrite if a value already exists.</p> ]]></content:encoded> </item> <item><title>By: David Cowgill</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-3641</link> <dc:creator>David Cowgill</dc:creator> <pubDate>Thu, 04 Mar 2010 08:26:18 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-3641</guid> <description>This is a very good tip. I also like to check and make sure the option doesn&#039;t already exist before clobbering it by accident. To do this make sure you run a quick if statement before each update_option like so.if(get_option(&#039;cp_num_images&#039;) == false) { update_option(&#039;cp_num_images&#039;, 3); }</description> <content:encoded><![CDATA[<p>This is a very good tip. I also like to check and make sure the option doesn't already exist before clobbering it by accident. To do this make sure you run a quick if statement before each update_option like so.</p><p>if(get_option('cp_num_images') == false) { update_option('cp_num_images', 3); }</p> ]]></content:encoded> </item> <item><title>By: N-Designs</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-1816</link> <dc:creator>N-Designs</dc:creator> <pubDate>Wed, 30 Sep 2009 05:43:31 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-1816</guid> <description>thanks for the tip. will try it..</description> <content:encoded><![CDATA[<p>thanks for the tip. will try it..</p> ]]></content:encoded> </item> <item><title>By: Octav</title><link>http://wpengineer.com/set-options-on-activation-themes/#comment-1802</link> <dc:creator>Octav</dc:creator> <pubDate>Wed, 23 Sep 2009 22:13:35 +0000</pubDate> <guid
isPermaLink="false">http://wpengineer.com/?p=1705#comment-1802</guid> <description>wow, this sounds really interesting, thanks for the tip!</description> <content:encoded><![CDATA[<p>wow, this sounds really interesting, thanks for the tip!</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Database Caching 8/13 queries in 0.046 seconds using disk
Object Caching 363/394 objects using disk

Served from: wpengineer.com @ 2010-07-29 13:15:34 -->