<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EVOL.reverse &#187; Wordpress</title>
	<atom:link href="http://www.morgadinho.org/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.morgadinho.org</link>
	<description>Let Yourself Be Conducted By It</description>
	<lastBuildDate>Mon, 26 Jul 2010 14:56:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Know your WordPress using the WP_DEBUG option</title>
		<link>http://www.morgadinho.org/2010/07/14/know-your-wordpress-using-the-wp_debug-option/</link>
		<comments>http://www.morgadinho.org/2010/07/14/know-your-wordpress-using-the-wp_debug-option/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:24:36 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2509</guid>
		<description><![CDATA[If you&#8217;re into WordPress I&#8217;m sure you tried already all sorts of plugins and themes.What you might not be familiar with is the WP_DEBUG option. It raises the error reporting level to include warning messages that may be lurking around and that you haven&#8217;t been told about, e.g. deprecated functions being called or variables not [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re into WordPress I&#8217;m sure you tried already all sorts of plugins and themes.What you might not be familiar with is the <tt>WP_DEBUG</tt> option. It raises the error reporting level to include warning messages that may be lurking around and that you haven&#8217;t been told about, e.g. deprecated functions being called or variables not being initialized. This happens because the default error reporting level of WordPress doesn&#8217;t include everything it could, I guess because some people don&#8217;t care or don&#8217;t know what to do with these messages. But it is good practice to have this option enabled in your development environment as any WordPress core developer or plugin/theme author will tell you.</p>
<p>It&#8217;s very simple to activate, just add to your wp-config.php file the following:</p>
<pre>define('WP_DEBUG', true);
</pre>
<p>But don&#8217;t do it in your site, otherwise you won&#8217;t be the only one looking at the warnings :|</p>
<p><a href="http://codex.wordpress.org/Editing_wp-config.php" target="_blank">http://codex.wordpress.org/Editing_wp-config.php</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/07/14/know-your-wordpress-using-the-wp_debug-option/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn off Sending Emails to New Users in WordPress Mu</title>
		<link>http://www.morgadinho.org/2010/06/11/wordpress-mu-turn-off-sending-emails-to-new-users/</link>
		<comments>http://www.morgadinho.org/2010/06/11/wordpress-mu-turn-off-sending-emails-to-new-users/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 11:55:39 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2442</guid>
		<description><![CDATA[&#8220;WordPress automatically sends an email with the password to new users. How can we disable this feature?&#8221; I&#8217;ve seen this question being asked around (e.g. here) and couldn&#8217;t find a helpful reply anywhere. I had this same problem and since I couldn&#8217;t find a clean way of doing it I had to comment a line [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;<em>WordPress automatically sends an email with the password to new users. How can we disable this feature?</em>&#8221;</p>
<p>I&#8217;ve seen this question being asked around (e.g. <a href="http://mu.wordpress.org/forums/topic/13251">here</a>) and couldn&#8217;t find a helpful reply anywhere.</p>
<p>I had this same problem and since I couldn&#8217;t find a clean way of doing it I had to comment a line in one of the core files. In the file wp-includes/pluggable.php, function wp_new_user_notification(),  you can comment the last line that reads:<br />
<code><br />
wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);<br />
</code></p>
<p><strong>I would love a cleaner way of doing this, if you know one please let me know!</strong></p>
<p>Note that with upgrades you will lose this change.  Unfortunately there seems to be no way around this until WordPress supports a filter or some other mechanism to do it in a cleaner way.</p>
<p>Also note that this is different from disabling new user notifications that are sent to the admin email, for that there is an option in the admin panel.</p>
<p>This was done against WordPress Mu 2.9.2. Your mileage may vary of course! :)</p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/06/11/wordpress-mu-turn-off-sending-emails-to-new-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Future of WordPress Video</title>
		<link>http://www.morgadinho.org/2010/06/08/the-future-of-wordpress-video/</link>
		<comments>http://www.morgadinho.org/2010/06/08/the-future-of-wordpress-video/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 13:52:03 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2436</guid>
		<description><![CDATA[Much to my amazement I was featured in Scott Berkun&#8217;s talk about the future of WordPress at the WordCamp San Francisco 2010 (around minute 33:36). Scott is a great speaker and a world reference in the technology world so I was very happy that he considered my input of enough value to be included. Thanks [...]]]></description>
			<content:encoded><![CDATA[<p>Much to my amazement I was featured in Scott Berkun&#8217;s talk about the future of WordPress at the WordCamp San Francisco 2010 (around minute 33:36). Scott is a great speaker and a world reference in the technology world so I was very happy that he considered my input of enough value to be included. </p>
<p><embed src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.21" type="application/x-shockwave-flash" width="640" height="360" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=V2vLctlg&amp;width=640&amp;height=360&amp;locksize=no&amp;dynamicseek=false&amp;qc_publisherId=p-18-mFEk4J448M" title="Scott Berkun: WordPress in 2020"></embed></p>
<p>Thanks Scott!</p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/06/08/the-future-of-wordpress-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Future of WordPress</title>
		<link>http://www.morgadinho.org/2010/04/13/the-future-of-wordpress/</link>
		<comments>http://www.morgadinho.org/2010/04/13/the-future-of-wordpress/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 16:57:21 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2428</guid>
		<description><![CDATA[Scott Berkun will talk about the future of WordPress at the WordCamp San Francisco 2010. He is asking for suggestions on things to talk so if you have any ideas head here. On the other hand, you can read upon my suggestions there or here: 1) Keep the Simplicity – My greatest fear with WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>Scott Berkun will talk about the future of WordPress at the WordCamp San Francisco 2010. He is asking for suggestions on things to talk so if you have any ideas head <a href="http://www.scottberkun.com/blog/2010/the-future-of-wordpress-help-wanted/" target="_blank">here</a>. On the other hand, you can read upon my suggestions there or here:</p>
<p>1) <strong>Keep the Simplicity</strong> – My greatest fear with WordPress is that  people won’t stop adding more things to it. I like its smallness. The  merging of WordPress MU in the upcoming 3.0 version is just one example  of the unnecessary growing complexity of the WordPress code base.</p>
<p>2) <strong>Be more Open</strong> – Automattic keeps control of the only official  plugin repository and WordPress only works with it. Reminds me of the  Apple App Store and I for sure don’t want anything like that for  WordPress.</p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/04/13/the-future-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Support Fernando Nobre</title>
		<link>http://www.morgadinho.org/2010/03/08/support-fernando-nobre/</link>
		<comments>http://www.morgadinho.org/2010/03/08/support-fernando-nobre/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 17:16:07 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2359</guid>
		<description><![CDATA[For the 2011 Portuguese Presidential elections I will be supporting Fernando Nobre. Not that anyone cares but I thought I should mention it. For that reason I&#8217;ve added to my blog a small support banner linking to the campaign site. I&#8217;ve also been thinking how I can contribute and help with the campaign, and how [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fernandonobre.org" target="_blank"><img class="aligncenter size-full wp-image-2348" title="fernandonobre" src="http://www.morgadinho.org/wp-content/uploads/2010/03/fernandonobre.gif" alt="" width="200" height="100" /></a></p>
<p>For the 2011 Portuguese Presidential elections I will be supporting <a href="http://www.fernandonobre.org" target="_blank">Fernando Nobre</a>. Not that anyone cares but I thought I should mention it. For that reason I&#8217;ve added to my blog a small support banner linking to the campaign site.</p>
<p>I&#8217;ve also been thinking how I can contribute and help with the campaign, and how to enable people that are interested in helping out to do so effectively, besides the obvious <a href="http://www.fernandonobre.org/formulario.php" target="_blank">sign-up for voluntary help</a> at the campaign site.</p>
<p>If you have a WordPress blog, I&#8217;ve made public a widget you can use on the sidebar of your blog to display a small image banner just like the one I&#8217;m using. It&#8217;s an easy way of showing our support and it&#8217;s very easy to install:</p>
<ol>
<li>Inside the WordPress admin, go to Plugins -&gt; Add New and search for &#8216;Fernando Nobre&#8217;.</li>
<li>Click &#8216;Install&#8217;.</li>
<li>Inside the WordPress admin, go to Appearance &gt; Widgets, and add the &#8216;Apoio Fernando Nobre&#8217; widget where you want, then save the changes.</li>
<li>That&#8217;s it!</li>
</ol>
<p>And here&#8217;s the link to the plugin page:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/support-fernando-nobre/" target="_blank">http://wordpress.org/extend/plugins/support-fernando-nobre/</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/03/08/support-fernando-nobre/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Internationalizing Your WordPress Plugin</title>
		<link>http://www.morgadinho.org/2010/02/16/internationalizing-your-wordpress-plugin/</link>
		<comments>http://www.morgadinho.org/2010/02/16/internationalizing-your-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 20:16:32 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2268</guid>
		<description><![CDATA[We call &#8220;internationalization&#8221; to the process of setting up software so that it can be used in different languages. In my case I had a plugin with text strings in English and I wanted to add a Portuguese translation. In wp-config.php I set up the WPLANG variable to pt_PT: define ('WPLANG', 'pt_PT'); I then used [...]]]></description>
			<content:encoded><![CDATA[<p>We call &#8220;internationalization&#8221; to the process of setting up software so that it can be used in different languages. In my case I had a plugin with text strings in English and I wanted to add a Portuguese translation. In wp-config.php I set up the WPLANG variable to pt_PT:</p>
<pre><span style="color: #000000;">define ('WPLANG', 'pt_PT');</span></pre>
<p>I then used poEdit, a localization tool that works with Mac OS X and that can be downloaded from the <a href="http://www.poedit.net/download.php">poEdit download</a> page. In poEdit, from the File menu select &#8216;New Catalog&#8217;. Fill in the information there and in the &#8216;Paths&#8217; tab put the plugin directory. In the &#8216;Keywords&#8217; tab add the missing entries so it looks like this:</p>
<p><a href="http://www.morgadinho.org/wp-content/uploads/2010/02/screen.png"><img class="aligncenter size-medium wp-image-2270" title="screen" src="http://www.morgadinho.org/wp-content/uploads/2010/02/screen-300x249.png" alt="" width="300" height="249" /></a></p>
<p>At this point it should recognize all the text strings in your code and present a screen where you can add the translations. After that be sure to save the file as pluginname-pt_PT.po, preferably in a directory called &#8216;translations&#8217; or &#8216;locales&#8217; (but anything will do). After that you&#8217;re all set. In your code you should load the translation like this:</p>
<pre><span style="color: #000000;">load_plugin_textdomain ( 'your-plugin-name' , FALSE , '/your-plugin-name/translations' );</span></pre>
<p>And strings should have the form:</p>
<pre><span style="color: #000000;">_e('Choose a Category','your-plugin-name');</span></pre>
<p>That&#8217;s it. Let me know if you run into troubles :)</p>
<p>Resources &amp; Further Reading for the Geeks:</p>
<ul>
<li> <a href="http://codex.wordpress.org/Writing_a_Plugin" rel="nofollow">http://codex.wordpress.org/Writing_a_Plugin</a></li>
<li> <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers" rel="nofollow">http://codex.wordpress.org/I18n_for_WordPress_Developers</a></li>
<li> <a href="http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/" rel="nofollow">http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/</a></li>
<li> <a href="http://urbangiraffe.com/articles/localizing-wordpress-themes-and-plugins/" rel="nofollow">http://urbangiraffe.com/articles/localizing-wordpress-themes-and-plugins/</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/02/16/internationalizing-your-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPMU posts return 404 not found</title>
		<link>http://www.morgadinho.org/2010/01/12/wpmu-posts-return-404-not-found/</link>
		<comments>http://www.morgadinho.org/2010/01/12/wpmu-posts-return-404-not-found/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:53:38 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2234</guid>
		<description><![CDATA[I&#8217;ve installed WordPress MU on a fresh Apache httpd and I go to try it out. I start by clicking on the &#8216;hello world&#8217; post that comes as default and the page returns a 404 &#8220;not found&#8221; message. What is happening? This keeps happening to me all the time so I might as well share [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve installed WordPress MU on a fresh Apache httpd and I go to try it out. I start by clicking on the &#8216;hello world&#8217; post that comes as default and the page returns a 404<span> &#8220;not found&#8221; message. What is happening? This keeps happening to me all the time so I might as well share it here for others.<br />
</span></p>
<p>This can be fixed this by setting &#8220;AllowOverride to All&#8221; in the httpd.conf file, in the relevant Directory directive section where MU is installed.</p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2010/01/12/wpmu-posts-return-404-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manage Multiple WordPress Installs</title>
		<link>http://www.morgadinho.org/2009/11/26/admin-several-wordpress-installs-from-the-same-interface/</link>
		<comments>http://www.morgadinho.org/2009/11/26/admin-several-wordpress-installs-from-the-same-interface/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 15:43:10 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[DOM & JavaScript]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://evolreverse.wordpress.com/?p=2091</guid>
		<description><![CDATA[I was wondering how to admin several WordPress installs from the same interface and came out with this simple idea of having a tab container where each tab would give access to the WordPress admin panel. This can be quite simple to develop by putting together a jQuery tab container and iframes. This could be [...]]]></description>
			<content:encoded><![CDATA[<p>I was wondering how to admin several WordPress installs from the same interface and came out with this simple idea of having a tab container where each tab would give access to the WordPress admin panel.</p>
<p>This can be quite simple to develop by putting together a jQuery tab container and iframes.</p>
<p>This could be further extended in a way that one single login would authenticate across all the WordPress installations. In this way we can manage the several installs from one single interface with full flexibility, i.e. we have exactly the same options as if we open separate windows and log into the installations.</p>
<p>Check out the example demo. Try going to Tab number 2 and logging in as user: admin / password: demo123</p>
<p><a target="_blank" href="http://www.morgadinho.org/demo/"><img src="http://evolreverse.files.wordpress.com/2009/11/demo.png?w=300" alt="" title="demo" width="300" height="215" class="alignnone size-medium wp-image-2095" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2009/11/26/admin-several-wordpress-installs-from-the-same-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authentication by POST/GET in WordPress</title>
		<link>http://www.morgadinho.org/2009/11/25/authentication-by-postget-in-wordpress/</link>
		<comments>http://www.morgadinho.org/2009/11/25/authentication-by-postget-in-wordpress/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 18:07:10 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://evolreverse.wordpress.com/?p=2053</guid>
		<description><![CDATA[For a project I&#8217;m working on I needed to trigger an action in a remote WordPress installation. I had a bit of trouble understanding how I could authenticate myself against the remote site. Eventually I found a clean and nice way and I want to share it here with you. Of course, if you&#8217;re not [...]]]></description>
			<content:encoded><![CDATA[<p>For a project I&#8217;m working on I needed to trigger an action in a remote WordPress installation. I had a bit of trouble understanding how I could authenticate myself against the remote site. Eventually I found a clean and nice way and I want to share it here with you. Of course, if you&#8217;re not into WordPress you can safely skip this post.</p>
<p><strong>The Problem</strong></p>
<p>Where I first stumbled was when from my plugin I tried to access directly the other plugin in the remote site. The code I was using for doing this was something like:</p>
<p><code><br />
	// create curl resource<br />
	$ch = curl_init();<br />
	// set url<br />
	curl_setopt($ch, CURLOPT_URL, "http://wordpress.mu/wp-admin/admin.php?page=myplugin");<br />
	//return the transfer as a string<br />
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
	// $output contains the output string<br />
	$output = curl_exec($ch);<br />
	// close curl resource to free up system resources<br />
	curl_close($ch);<br />
	// print the result of the whole request:<br />
	print "CONTENT = ".$output;<br />
</code></p>
<p>And this wouldn&#8217;t work because although I was authenticated in the remote site via the browser, the session that the curl request creates is not, and so this request results in us being redirected to the login page.</p>
<p><strong>What to do?</strong></p>
<p>Ideally we want to do a POST request that we execute before and that authenticates us. I searched around on how to do this but couldn&#8217;t find anything. What I found was one of the many third-party applications that allow talking to WordPress remotely. I then looked at how they work and how they authenticate themselves.</p>
<p>Instead of doing a POST request to the plugin page like before, they do a POST request to the site&#8217;s index.php. A plugin is registered to catch a particular POST request. Then you simple use the WordPress function user_pass_ok(), that authenticates the user against the database.</p>
<p>Here I demonstrate how to do this using a GET request, because its simpler, but the same thing would work with a POST request.<br />
<code><br />
add_action('plugins_loaded', 'unpackimport_createblog', -1);<br />
function unpackimport_createblog() {<br />
	if(isset($_GET['myplugin'])) {<br />
			if(user_pass_ok($_REQUEST['username'], $_REQUEST['password']))<br />
				echo 'Authentication successful';<br />
}<br />
</code></p>
<p>And the client request:<br />
<code><br />
curl_setopt($ch, CURLOPT_URL, "http://wordpress.mu/index.php?myplugin=true&amp;username=test&amp;password=testpass");<br />
</code></p>
<p><strong>Screencast</strong></p>
<p>I wanted to show a working example rather than just saying this works so I did this screencast. You can also download the plugins yourself and try them out.</p>
<p><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/Ort-IMmpo4s&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/Ort-IMmpo4s&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=Ort-IMmpo4s">www.youtube.com/watch?v=Ort-IMmpo4s</a></p></p>
<p><strong>Download</strong></p>
<p><a href="http://www.morgadinho.org/static/unpack_import_demo.tar.gz">unpack_import_demo.tar.gz</a><br />
<a href="http://www.morgadinho.org/static/dump_pack_demo.tar.gz">dump_pack_demo.tar.gz</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2009/11/25/authentication-by-postget-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the Default Blog in WordPress MU</title>
		<link>http://www.morgadinho.org/2009/11/19/changing-the-default-blog-in-wordpress-mu/</link>
		<comments>http://www.morgadinho.org/2009/11/19/changing-the-default-blog-in-wordpress-mu/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 13:06:26 +0000</pubDate>
		<dc:creator>Nuno Morgadinho</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.morgadinho.org/?p=2017</guid>
		<description><![CDATA[WordPress MU is a platform that allows you to host and manage multiple WordPress installations. It is used to power WordPress.com, among other sites. The basic of WordPress MU is that the user registers and upon the click of a button, a blog is generated for him, available to use immediately. The default blog that [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress MU is a platform that allows you to host and manage multiple WordPress installations. It is used to power <a href="http://wordpress.com">WordPress.com</a>, among other sites.</p>
<p>The basic of WordPress MU is that the user registers and upon the click of a button, a blog is generated for him, available to use immediately.</p>
<p>The default blog that is generated is the most basic thing you can get. It uses the default Kubrick theme, no plugins or widgets, and a bit of example content (a post, a page, a comment and some links).</p>
<p>I&#8217;m working on a WordPress MU project now and I had to change the default blog to something more elaborate. So I went and researched a bit what can be done and what is supported. Here&#8217;s what I&#8217;ve found.</p>
<p>There are a couple of MU plugins that allow you through an admin panel to edit some defaults (blog title, default theme, stuff like that). If you&#8217;re into that kind of thing see the <a href="http://wpmudev.org/project/New-Blog-Defaults">New Blog Defaults</a> plugin. But in fact what I wanted was something more along the lines of developing my default blog locally (in a local MU installation) and then deploy to the production site with minimum hassle.</p>
<p>I found another plugin called <a href="http://wpmudev.org/project/blog-templates">Blog Templates</a> and with it you can create a template from a blog. This template will be saved in a different database table &#8216;wp_gp_templates&#8217; and will contain posts, pages, links, post categories and some blog options. You can easily extend it by adding more options to be saved if you need to. You can then upload the template to the production server and it will be applied as a template to new blogs. Pretty cool.</p>
<p><strong>exclude pages plugin</strong></p>
<p>I had a plugin to exclude certain pages from the menu. This was a question of adding an extra option to be saved in the template. *</p>
<p><strong>copying plugin settings</strong></p>
<p>Information about what plugins are active is kept inside the options table and so it can be saved quite easily:</p>
<p>$newoptions['active_plugins'] = get_option(&#8216;active_plugins&#8217;);</p>
<p>A problem with this is you still need to make sure all the plugins you had locally installed are on the server. Not a big deal but something to keep in mind.</p>
<p><strong>copying widget settings</strong></p>
<p>Widget settings are also kept inside the options table so it&#8217;s not a big deal to extend the plugin to also save them (you still need to work out which options to save though). Because normally widgets are registered from plugins you again need to make sure all the plugins you had locally are on the server.</p>
<p><strong>theme</strong></p>
<p>The theme name is saved in the template but you still need to manually make sure all the theme files are on the server, and if not, upload them.</p>
<p><strong>post meta / custom fields</strong></p>
<p>I extended the plugin to clone all of the meta items for a post. This seems to work quite well without any problems. I might work together with the plugin author to include this as an option in the plugin or maybe release the code here separately.</p>
<p>* A problem with this is that because the pages are excluded based on their ID, you need to be sure that the pages will be created with the same ID that is saved to the template (this is a problem if you have created pages and then deleted them because the IDs will not be the first ones).</p>]]></content:encoded>
			<wfw:commentRss>http://www.morgadinho.org/2009/11/19/changing-the-default-blog-in-wordpress-mu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
