<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Automating WordPress customizations &#8211; the plugin way</title>
	<atom:link href="http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/</link>
	<description>Hacking WordPress. Keeping the bits together.</description>
	<lastBuildDate>Fri, 13 Nov 2009 19:04:35 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: WordPress links: uge 47 - 2007 « WordPress Tips</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-1903</link>
		<dc:creator>WordPress links: uge 47 - 2007 « WordPress Tips</dc:creator>
		<pubDate>Wed, 21 Nov 2007 21:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-1903</guid>
		<description>[...] Automating WordPress customizations - the plugin way Hvis du implementerer nye WordPress-blogs, vil du som regel altid starte med at tilpasse alle indstillingerne, præcis som du vil have det. Her beskrives hvordan man laver et plugin, der hurtigt sætter alle éns standard-indstillinger. [...]</description>
		<content:encoded><![CDATA[<p>[...] Automating WordPress customizations &#8211; the plugin way Hvis du implementerer nye WordPress-blogs, vil du som regel altid starte med at tilpasse alle indstillingerne, præcis som du vil have det. Her beskrives hvordan man laver et plugin, der hurtigt sætter alle éns standard-indstillinger. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vipin</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-1643</link>
		<dc:creator>vipin</dc:creator>
		<pubDate>Sat, 20 Oct 2007 17:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-1643</guid>
		<description>thx for the info</description>
		<content:encoded><![CDATA[<p>thx for the info</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: www.ngtech.gr &#187; Primary category WordPress plugin test</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-544</link>
		<dc:creator>www.ngtech.gr &#187; Primary category WordPress plugin test</dc:creator>
		<pubDate>Fri, 17 Aug 2007 20:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-544</guid>
		<description>[...] It seems I am becoming a customizing WordPress the plugin way [...]</description>
		<content:encoded><![CDATA[<p>[...] It seems I am becoming a customizing WordPress the plugin way [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adding options to WordPress plugins &#171; WordPress Bits</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-485</link>
		<dc:creator>Adding options to WordPress plugins &#171; WordPress Bits</dc:creator>
		<pubDate>Wed, 15 Aug 2007 12:50:34 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-485</guid>
		<description>[...] cleanup is called and options are removed from the database.  We saw how to do this before, in the automation with plugin [...]</description>
		<content:encoded><![CDATA[<p>[...] cleanup is called and options are removed from the database.  We saw how to do this before, in the automation with plugin [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leonid Mamchenkov</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-388</link>
		<dc:creator>Leonid Mamchenkov</dc:creator>
		<pubDate>Sun, 12 Aug 2007 11:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-388</guid>
		<description>Murk,

thanks for the suggestion.  There are indeed quite a few plugins to handle this task, but perhaps it&#039;s time to give them all a hard look and select the one that does the job properly. ;)</description>
		<content:encoded><![CDATA[<p>Murk,</p>
<p>thanks for the suggestion.  There are indeed quite a few plugins to handle this task, but perhaps it&#8217;s time to give them all a hard look and select the one that does the job properly. ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Murk</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-387</link>
		<dc:creator>Murk</dc:creator>
		<pubDate>Sun, 12 Aug 2007 09:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-387</guid>
		<description>Idea for future article:

Automated mirroring, i.e. d/load the sql dbase from the first server, install it on second server, rewrite references in the wp dbase to reflect the new location (e.g. server name and path - possibly blog title/subtitle). 

Repeat process automagically at intervals.

(Yes, there is the feedwordpress plugin, but that doesn&#039;t take all the data, e.g. comments etc)</description>
		<content:encoded><![CDATA[<p>Idea for future article:</p>
<p>Automated mirroring, i.e. d/load the sql dbase from the first server, install it on second server, rewrite references in the wp dbase to reflect the new location (e.g. server name and path &#8211; possibly blog title/subtitle). </p>
<p>Repeat process automagically at intervals.</p>
<p>(Yes, there is the feedwordpress plugin, but that doesn&#8217;t take all the data, e.g. comments etc)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Top English WP Blogs &#171; KHỦNG LONG IT</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-366</link>
		<dc:creator>Top English WP Blogs &#171; KHỦNG LONG IT</dc:creator>
		<pubDate>Sat, 11 Aug 2007 18:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-366</guid>
		<description>[...]  Automating WordPress customizations - the plugin way If you installed WordPress more than two times, you know the drill. Download the latest version, unzip or untar, copy [&#8230;] [...]</description>
		<content:encoded><![CDATA[<p>[...]  Automating WordPress customizations &#8211; the plugin way If you installed WordPress more than two times, you know the drill. Download the latest version, unzip or untar, copy [&#8230;] [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recommended Reading for 8th August through 10th August</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-358</link>
		<dc:creator>Recommended Reading for 8th August through 10th August</dc:creator>
		<pubDate>Sat, 11 Aug 2007 00:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-358</guid>
		<description>[...] Automating WordPress customizations - the plugin way - How to create a plugin to automatically set defaults in WordPress to your specifications. Really useful for anyone who manages multiple WordPress installations. [...]</description>
		<content:encoded><![CDATA[<p>[...] Automating WordPress customizations &#8211; the plugin way &#8211; How to create a plugin to automatically set defaults in WordPress to your specifications. Really useful for anyone who manages multiple WordPress installations. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leonid Mamchenkov</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-351</link>
		<dc:creator>Leonid Mamchenkov</dc:creator>
		<pubDate>Fri, 10 Aug 2007 20:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-351</guid>
		<description>Aaron,

it&#039;s clear now.  Thanks a lot for the explanation.  Indeed, this is one way to do this, and suits well for development-production switching.  In fact, this can be further extended with a couple of admin options, for URLs on production/development servers.  This way a single version of plugin can be used to work on multiple sites - handy for web design companies, like ours.

Thanks for the idea. :)</description>
		<content:encoded><![CDATA[<p>Aaron,</p>
<p>it&#8217;s clear now.  Thanks a lot for the explanation.  Indeed, this is one way to do this, and suits well for development-production switching.  In fact, this can be further extended with a couple of admin options, for URLs on production/development servers.  This way a single version of plugin can be used to work on multiple sites &#8211; handy for web design companies, like ours.</p>
<p>Thanks for the idea. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-343</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Fri, 10 Aug 2007 16:44:41 +0000</pubDate>
		<guid isPermaLink="false">http://wpbits.wordpress.com/2007/08/09/automating-wordpress-customizations-the-plugin-way/#comment-343</guid>
		<description>&lt;q&gt;care to elaborate? How do you see this done?&lt;/q&gt;

The easiest way is to just filter the home and siteurl options: (ignore the function names, I pulled them out of a project.)


&lt;code&gt;

	add_filter(&#039;option_home&#039;, &#039;sprcat_fix_link&#039;,0);
	add_filter(&#039;option_siteurl&#039;, &#039;sprcat_fix_link&#039;,0);

function sprcat_fix_link ($link){
	$url = str_replace(array(&#039;www.&#039;,&#039;./&#039;),&#039;&#039;,$_SERVER[&#039;HTTP_HOST&#039;]);

	if(strpos($link,$url) === false ){

			$link = preg_replace(&#039;/(http.*?\:\/\/w*\.*)(.*?)(\/?.*)/&#039;,&#039;${1}&#039;.$url.&#039;${3}&#039;,$link);
		
	}
return $link;
}

&lt;/code&gt;

You could get all fancy and actually change the link, but this will be perfect if you have a mirror install. If you don&#039;t you may have to use an if/else instead of the preg_replace:

&lt;code&gt;
if($url != &#039;anthologyoi.com&#039;){
$link = &#039;http://localhost/test/dev/aoi/&#039;;

}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><q>care to elaborate? How do you see this done?</q></p>
<p>The easiest way is to just filter the home and siteurl options: (ignore the function names, I pulled them out of a project.)</p>
<p><code></p>
<p>	add_filter('option_home', 'sprcat_fix_link',0);<br />
	add_filter('option_siteurl', 'sprcat_fix_link',0);</p>
<p>function sprcat_fix_link ($link){<br />
	$url = str_replace(array('www.','./'),'',$_SERVER['HTTP_HOST']);</p>
<p>	if(strpos($link,$url) === false ){</p>
<p>			$link = preg_replace('/(http.*?\:\/\/w*\.*)(.*?)(\/?.*)/','${1}'.$url.'${3}',$link);</p>
<p>	}<br />
return $link;<br />
}</p>
<p></code></p>
<p>You could get all fancy and actually change the link, but this will be perfect if you have a mirror install. If you don&#8217;t you may have to use an if/else instead of the preg_replace:</p>
<p><code><br />
if($url != 'anthologyoi.com'){<br />
$link = 'http://localhost/test/dev/aoi/';</p>
<p>}<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
