<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dented Reality &#187; plugins</title>
	<atom:link href="http://dentedreality.com.au/tags/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://dentedreality.com.au</link>
	<description>Beau Lebens throws down his opinion on all sorts of things he doesn&#039;t know too much about.</description>
	<lastBuildDate>Tue, 07 Feb 2012 20:48:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress Plugins for Multiple Versions</title>
		<link>http://dentedreality.com.au/2010/08/wordpress-plugins-multiple-versions/</link>
		<comments>http://dentedreality.com.au/2010/08/wordpress-plugins-multiple-versions/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 19:16:09 +0000</pubDate>
		<dc:creator>Beau Lebens</dc:creator>
				<category><![CDATA[Techn(ical|ology)]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://dentedreality.com.au/?p=5307</guid>
		<description><![CDATA[If you&#8217;re a WordPress Plugin developer, you may find yourself in the unenviable position of needing to maintain one of your plugins across multiple versions of WordPress. Until recently, I maintained the IntenseDebate plugin for versions 2.5 and up of WordPress, including versions 2.6 of WPMU and up. That&#8217;s a lot of versions (10 actually, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-5501" style="margin-left: 10px; margin-right: 10px;" title="Grey WordPress Logo" src="http://dentedreality.com.au/wp-content/uploads/2010/08/grey-m.png" alt="WordPress" width="100" height="100" />If you&#8217;re a WordPress Plugin developer, you may find yourself in the unenviable position of needing to maintain one of your plugins across multiple versions of WordPress. Until recently, I maintained the IntenseDebate plugin for versions 2.5 and up of WordPress, including versions 2.6 of WPMU and up. That&#8217;s a lot of versions (10 actually, not counting minor revisions). Here are some tips I picked up/developed to try to make my life a little easier along the way.</p>
<p><span id="more-5307"></span></p>
<h3>Table Prefixes</h3>
<p>Did you know that WordPress supports to use of a <a href="http://codex.wordpress.org/Installing_Multiple_Blogs#Single_Database">different table prefix for each installation</a>? You may not really have noticed but it&#8217;s even an option in the wizard-style installer if you don&#8217;t manually configure your wp-config.php file during setup. This means that you can modify the names of the tables used for a specific installation of WordPress to avoid clashing with other tables that may already exist within your database. It also means that you can easily run multiple copies of WordPress from a single database by using a different table prefix on each install. I just use a different prefix for each major version of WordPress (wp28_, wp29_, wp30_) and then I can install them all in a single database and have easy access to everything.</p>
<p>For the sake of my own sanity, I opted to install WPMU in different databases (named according to the version I was installing) since it creates lots of tables.</p>
<h3>Multiple Installs</h3>
<p>Apart from the table prefixes trick, I like to use the version of the install as the name of the blog (&#8220;WordPress 2.9&#8243;) so that I always know what I&#8217;m looking at. I&#8217;ll set all of the admin accounts to the same details, and then import the same set of test content (via a WordPress Export/Import). That gives me a consistent environment to work from.</p>
<h3>Symlinks</h3>
<p>So now you have a bunch of different installations of WordPress, all using the same database (although different tables). You need to get your code in place so that you can test it on each version. One option would be to put a copy of your plugin in each wp-content/plugins directory, but then that quickly gets out of control if you make changes to any of them while you&#8217;re debugging/developing. A better option is to put your code in one place, then symlink it into location in all of your installs. I use something like this:</p>
<pre>ln -ns ../../../dev/pluginname pluginname</pre>
<p>(executed from within the wp-content/plugins directory of each install, and assuming a directory called dev/pluginname containing the plugin, at the same top level as all of your installations). This links wp-content/plugins/pluginname from each install back to the same set of code, and allows you to modify it in any of them and have that change be reflected in them all.</p>
<h3>Capability Checks</h3>
<p>Rather than checking for a specific version of WordPress (which is actually easy to do), I usually prefer to test for specific functionality. For example, to see if you can use the WP_Http() API (introduced back in WP 2.7), you could do something like this:</p>
<pre>if ( function_exists( 'wp_remote_get' ) ) {
    // Can use WP_Http()
}</pre>
<p>If you really want to check for a version of WordPress, then you probably want something like this (note that the $wpmu_version check in this case is to make sure we&#8217;re NOT using WPMU). You might need to declare it as global if you&#8217;re doing this within a function:</p>
<pre>if ( version_compare( get_bloginfo( 'version' ), '2.7', '&lt;' ) &amp;&amp; empty( $wpmu_version ) ) {
    // do stuff
}</pre>
<h3>Tracking Major Changes</h3>
<p>The other big issue is keeping track of what changes from version to version and how that might affect your plugins. Probably the easiest way to at least get a cursory glance at this is using the announcement pages on the <a href="http://codex.wordpress.org/">Codex</a>. For example, here is the announcement page for <a href="http://codex.wordpress.org/Version_3.0">Version 3.0</a>. If you need more detail, you can also try getting a report from Trac, like this one which covers <a href="http://core.trac.wordpress.org/query?status=accepted&amp;status=assigned&amp;status=closed&amp;status=new&amp;status=reopened&amp;status=reviewing&amp;order=priority&amp;col=id&amp;col=summary&amp;col=status&amp;col=owner&amp;col=type&amp;col=priority&amp;col=milestone&amp;milestone=3.0">everything in 3.0</a>. Combining these, you can come up with a bit of a list of things that are likely to affect your plugin, depending on exactly what it does. As usual, the more you stick to the documented APIs, the less likely that your plugin will break over time. I personally use this to find new/better ways of doing things and harnessing new features that are introduced more than anything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://dentedreality.com.au/2010/08/wordpress-plugins-multiple-versions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:thumbnail url="http://dentedreality.com.au/wp-content/uploads/2010/08/grey-m-80x80.png" />
		<media:content url="http://dentedreality.com.au/wp-content/uploads/2010/08/grey-m.png" medium="image">
			<media:title type="html">Grey WordPress Logo</media:title>
			<media:thumbnail url="http://dentedreality.com.au/wp-content/uploads/2010/08/grey-m-80x80.png" />
		</media:content>
	</item>
		<item>
		<title>Updated to WordPress 2.8</title>
		<link>http://dentedreality.com.au/2009/06/updated-to-wordpress-2-8/</link>
		<comments>http://dentedreality.com.au/2009/06/updated-to-wordpress-2-8/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 18:18:26 +0000</pubDate>
		<dc:creator>Beau Lebens</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Techn(ical|ology)]]></category>
		<category><![CDATA[inten]]></category>
		<category><![CDATA[intensedebate]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp 2.8]]></category>

		<guid isPermaLink="false">http://dentedreality.com.au/?p=1052</guid>
		<description><![CDATA[I&#8217;ve just updated this site to WordPress 2.8, using my favorite method for handling a WordPress install, Subversion. Here&#8217;s what I typed at the command line to upgrade: svn switch http://svn.automattic.com/wordpress/tags/2.8/ Once that was complete, I logged into my admin panel and completed the DB upgrade, then I had to check some plugins. I had [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just updated this site to <a href="http://wordpress.org/development/2009/06/wordpress-28/">WordPress 2.8</a>, using my favorite method for handling a WordPress install, <a href="http://dentedreality.com.au/2008/12/managing-wordpress-with-subversion/">Subversion</a>. Here&#8217;s what I typed at the command line to upgrade:</p>
<pre>svn switch http://svn.automattic.com/wordpress/tags/2.8/</pre>
<p>Once that was complete, I logged into my admin panel and completed the DB upgrade, then I had to check some plugins. I had these problems/changes:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/tinymce-advanced/">TinyMCE Advanced</a> had an update available, so I did that,</li>
<li><a href="http://wordpress.org/extend/plugins/one-click-plugin-updater/">One Click Plugin Updater</a> seems to clash with the new Plugins page, and I don&#8217;t really need it now anyway since its functionality is in core, so I deactivated it and then deleted it</li>
<li><a href="http://wordpress.org/extend/plugins/intensedebate/">IntenseDebate</a> seems to clash with some of the JavaScript now used in the admin, but I work with those guys now, so I&#8217;m working on a new version of the plugin to address those issues! My comments are a bit ugly while I deal with this, but I figure that&#8217;s a good motivation to get it done ASAP.</li>
</ul>
<p>Have you upgraded yet?</p>
]]></content:encoded>
			<wfw:commentRss>http://dentedreality.com.au/2009/06/updated-to-wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
	</item>
		<item>
		<title>Really Getting Close</title>
		<link>http://dentedreality.com.au/2005/05/really-getting-close/</link>
		<comments>http://dentedreality.com.au/2005/05/really-getting-close/#comments</comments>
		<pubDate>Mon, 02 May 2005 19:53:00 +0000</pubDate>
		<dc:creator>Beau Lebens</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[dogfood]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[webpad]]></category>
		<category><![CDATA[webpad 3.0]]></category>

		<guid isPermaLink="false">http://wiggin.local/dev/dentedreality.com.au/2005/05/really-getting-close/</guid>
		<description><![CDATA[Tonight I secured webpad a little more heavily, standardised some more of the operations across different sections and generally tidied things up. I also added &#8216;delete post&#8217; functionality to the currently supported blog systems (blosxom, Blogger.com, TypePad and LiveJournal), and that&#8217;s looking pretty slick. Part of add the delete functionality required me to write out [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight I secured webpad a little more heavily, standardised some more of the operations across different sections and generally tidied things up. I also added &#8216;delete post&#8217; functionality to the currently supported blog systems (<a href="http://www.blosxom.com/">blosxom</a>, <a href="http://www.blogger.com/">Blogger.com</a>, <a href="http://www.sixapart.com/typepad/">TypePad</a> and <a href="http://www.sixapart.com/livejournal/">LiveJournal</a>), and that&#8217;s looking pretty slick.</p>
<p>Part of add the delete functionality required me to write out the (very, very simple) plugin API for adding and removing tools to the toolbar. I may be a little biased (and not at all modest), but I think it&#8217;s pretty cool <img src='http://dentedreality.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  More about plugins later &#8211; but basically webpad 3.0 supports plugins through a &#8220;My Plugins&#8221; section, so hopefully people might even write some new features for it, allowing access to more external sources of text to edit!</p>
<p>So, I can hear you asking; what&#8217;s left? Well:</p>
<ol type="1">
<li><strike>MovableType Support (open, edit, create, delete)</strike></li>
<li><strike>WordPress Support (ditto)</strike></li>
<li><strike>Update a few interface niceties (like the &#8216;About webpad&#8217; dialog)</strike></li>
<li><strike>Write the new Help Manual, which is a lot different to the last version, and will be a lot bigger</strike></li>
<li>Update the webpad project page</li>
<li><strike>Fix a scrolling bug in Mozilla</strike> (fixed on PC, needs a tweak for Mac)</li>
<li>Pretty up some of the error messages</li>
<li>Thorough system testing before release</li>
<li>Packaging up with some instructions on installation</li>
</ol>
<p>Oh yeah, and of course, I&#8217;m doing the whole dog-food eating thing and as usual, this is posted with the very latest version of webpad (from FireFox), using a couple of the tools and bits and pieces and it&#8217;s all looking good.</p>
]]></content:encoded>
			<wfw:commentRss>http://dentedreality.com.au/2005/05/really-getting-close/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Flavour Coming Your Way</title>
		<link>http://dentedreality.com.au/2003/05/flavour-coming-your-way/</link>
		<comments>http://dentedreality.com.au/2003/05/flavour-coming-your-way/#comments</comments>
		<pubDate>Thu, 15 May 2003 07:02:00 +0000</pubDate>
		<dc:creator>Beau Lebens</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Techn(ical|ology)]]></category>
		<category><![CDATA[blosxom]]></category>
		<category><![CDATA[flavour]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://wiggin.local/dev/dentedreality.com.au/2003/05/flavour-coming-your-way/</guid>
		<description><![CDATA[Following a request from the blosxom mailing list, I&#8217;ll be packaging up the flavour files and associated style sheets used on this blog for download. I&#8217;ll post here when they are done. I&#8217;ll need to remove some &#8220;specific&#8221; bits which won&#8217;t make sense for other people first tho]]></description>
			<content:encoded><![CDATA[<p>Following a request from the <a href="http://groups.yahoo.com/group/blosxom">blosxom mailing list</a>, I&#8217;ll be packaging up the flavour files and associated style sheets used on this blog for download. I&#8217;ll post here when they are done. I&#8217;ll need to remove some &#8220;specific&#8221; bits which won&#8217;t make sense for other people first tho <img src='http://dentedreality.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dentedreality.com.au/2003/05/flavour-coming-your-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
	</channel>
</rss>

