<?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: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>real ultimate waffe (.net) &#187; WordPress</title>
	<atom:link href="http://mdawaffe.wordpress.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://mdawaffe.wordpress.com</link>
	<description>FACT: mdawaffes are mammals</description>
	<lastBuildDate>Tue, 06 Nov 2012 22:30:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mdawaffe.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>real ultimate waffe (.net) &#187; WordPress</title>
		<link>http://mdawaffe.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mdawaffe.wordpress.com/osd.xml" title="real ultimate waffe (.net)" />
	<atom:link rel='hub' href='http://mdawaffe.wordpress.com/?pushpress=hub'/>
		<item>
		<title>WordCamp OC: REST/JSON API Slides</title>
		<link>http://mdawaffe.wordpress.com/2012/06/13/wordcamp-oc-restjson-api-slides/</link>
		<comments>http://mdawaffe.wordpress.com/2012/06/13/wordcamp-oc-restjson-api-slides/#comments</comments>
		<pubDate>Wed, 13 Jun 2012 06:44:38 +0000</pubDate>
		<dc:creator>Mike Adams (mdawaffe)</dc:creator>
				<category><![CDATA[Automattic]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mdawaffe.wordpress.com/?p=262</guid>
		<description><![CDATA[Here&#8217;s the slides for my WordCamp OC 2012 presentation. My previous post has several links and examples.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=262&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<iframe src='http://www.slideshare.net/slideshow/embed_code/13303209' width='640' height='525'></iframe>
<p><img class="alignright" src="http://2012.oc.wordcamp.org/files/2012/04/wcoc2012_im_speaking.png" /></p>
<p>Here&#8217;s the slides for my <a href="http://2012.oc.wordcamp.org/">WordCamp OC 2012</a> presentation.</p>
<p>My <a href="http://mdawaffe.wordpress.com/2012/06/02/wordcamp-oc-restjson-api-talk/">previous post</a> has several links and examples.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mdawaffe.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mdawaffe.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=262&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mdawaffe.wordpress.com/2012/06/13/wordcamp-oc-restjson-api-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>33.661517 -117.901356</georss:point>
		<geo:lat>33.661517</geo:lat>
		<geo:long>-117.901356</geo:long>
		<media:content url="http://1.gravatar.com/avatar/4d346581a3340e32cf93703c9ce46bd4?s=96&#38;d=monsterid&#38;r=R" medium="image">
			<media:title type="html">mdawaffe</media:title>
		</media:content>

		<media:content url="http://2012.oc.wordcamp.org/files/2012/04/wcoc2012_im_speaking.png" medium="image" />
	</item>
		<item>
		<title>WordCamp OC: REST/JSON API Talk</title>
		<link>http://mdawaffe.wordpress.com/2012/06/02/wordcamp-oc-restjson-api-talk/</link>
		<comments>http://mdawaffe.wordpress.com/2012/06/02/wordcamp-oc-restjson-api-talk/#comments</comments>
		<pubDate>Sat, 02 Jun 2012 22:33:04 +0000</pubDate>
		<dc:creator>Mike Adams (mdawaffe)</dc:creator>
				<category><![CDATA[Automattic]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mdawaffe.wordpress.com/?p=247</guid>
		<description><![CDATA[I&#8217;m speaking at WordCamp Orange County 2012 today about WordPress&#8217; core HTTP APIs and WordPress.com&#8217;s REST API. This post has a bunch of links and examples for the attendees to reference later. Click the &#8220;Pages&#8221; links below to find everything. &#8230; <a href="http://mdawaffe.wordpress.com/2012/06/02/wordcamp-oc-restjson-api-talk/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=247&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" src="http://2012.oc.wordcamp.org/files/2012/04/wcoc2012_im_speaking.png" /></p>
<p>I&#8217;m speaking at <a href="http://2012.oc.wordcamp.org/">WordCamp Orange County 2012</a> today about WordPress&#8217; core HTTP APIs and WordPress.com&#8217;s <a href="http://developer.wordpress.com/docs/api/">REST API</a>.</p>
<p>This post has a bunch of links and examples for the attendees to reference later.</p>
<p>Click the &#8220;Pages&#8221; links below to find everything.</p>
<p><strong>Update</strong>: <a href="http://mdawaffe.wordpress.com/2012/06/13/wordcamp-oc-restjson-api-slides/">Slides are up</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mdawaffe.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mdawaffe.wordpress.com/247/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=247&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mdawaffe.wordpress.com/2012/06/02/wordcamp-oc-restjson-api-talk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4d346581a3340e32cf93703c9ce46bd4?s=96&#38;d=monsterid&#38;r=R" medium="image">
			<media:title type="html">mdawaffe</media:title>
		</media:content>

		<media:content url="http://2012.oc.wordcamp.org/files/2012/04/wcoc2012_im_speaking.png" medium="image" />
	</item>
		<item>
		<title>WordPress __autoload() idea</title>
		<link>http://mdawaffe.wordpress.com/2009/03/31/wordpress-__autoload-idea/</link>
		<comments>http://mdawaffe.wordpress.com/2009/03/31/wordpress-__autoload-idea/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 08:36:53 +0000</pubDate>
		<dc:creator>Mike Adams (mdawaffe)</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mdawaffe.wordpress.com/?p=69</guid>
		<description><![CDATA[PHP 5 introduces autoloading classes. The way WordPress is currently structured, I don&#8217;t think we&#8217;d get much benefit from switching to autoloading. There aren&#8217;t that many classes in core WordPress that don&#8217;t need to get loaded on every page load. &#8230; <a href="http://mdawaffe.wordpress.com/2009/03/31/wordpress-__autoload-idea/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=69&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>PHP 5 introduces <a href="http://php.net/manual/en/language.oop5.autoload.php">autoloading classes</a>.  The way WordPress is currently structured, I don&#8217;t think we&#8217;d get much benefit from switching to autoloading.  There aren&#8217;t that many classes in core WordPress that don&#8217;t need to get loaded on every page load.</p>
<p>With some restructuring, though, we might be able to cut down on the number of bytes of code we load on every page (and we could get rid of some <code>class_exists()</code> and <code>require_once</code> calls).</p>
<p>We&#8217;d want an autoloader, though, that could handle plugin files as well as core files.</p>
<p><span id="more-69"></span></p>
<p><strong>Idea</strong>: an autoloader that can load classes from some deterministic path (e.g., the usual <code>$classname.class.php</code> or what have you) but that can also register classes at specific paths.</p>
<pre class="brush: php; title: ; notranslate">
if ( !defined( 'WP_AUTOLOAD_CLASSES' ) ) {
    define(
        'WP_AUTOLOAD_CLASSES',
        function_exists( 'spl_autoload_register' )
    );
}

if ( WP_AUTOLOAD_CLASSES ) {
   /**
&lt;ul&gt;
  &lt;li&gt;PHP 5.1.2+&lt;/li&gt;
&lt;li&gt;Called once per class during setup (each time&lt;/li&gt;
&lt;li&gt;with two args) to tell it where the class is&lt;/li&gt;
&lt;li&gt;located.&lt;/li&gt;
&lt;li&gt;Don't need to call for a class if that class&lt;/li&gt;
&lt;li&gt;exists in some easy deterministic path.&lt;/li&gt;
&lt;li&gt;Called (with only one arg) when looking for a&lt;/li&gt;
&lt;li&gt;not-currently-loaded class.&lt;/li&gt;
&lt;li&gt;/&lt;/li&gt;
&lt;/ul&gt;

    function wp_autoload( $class, $path = null ) {
        static $classes = array();

        // Being called by PHP's autoloader
        if ( is_null( $path ) ) {
            if ( isset( $classes[$class] ) ) {
               /* Use include, not require.  That
&lt;ul&gt;
  &lt;li&gt;way we get a more meaningful&lt;/li&gt;
&lt;li&gt;Fatal error: class does not exist&lt;/li&gt;
&lt;li&gt;/&lt;/li&gt;
&lt;/ul&gt;

                include( $classes[$class] );
            } else {
               /* Look in some default path(s) for
&lt;ul&gt;
  &lt;li&gt;appropriately named files.&lt;/li&gt;
&lt;li&gt;/&lt;/li&gt;
&lt;/ul&gt;

            }
            return;
        }

        // Being called by us
        $classes[$class] = $path;
    }
    
    // Register it
    spl_autoload_register( 'wp_autoload' );
} else {
   /**
&lt;ul&gt;
  &lt;li&gt;PHP 4 (PHP 5.1.1-)&lt;/li&gt;
&lt;li&gt;Just require each file.&lt;/li&gt;
&lt;li&gt;/&lt;/li&gt;
&lt;/ul&gt;

    function wp_autoload( $class, $path ) {
        require_once( $path );
    }
}

// Core classes in WPINC probably wouldn't have
// to be explicitly registered, but as an example:
wp_autoload(
    'WP_Error',
    ABSPATH . WPINC . '/classes.php'
);
// OK to call multiple times per path
wp_autoload(
    'Walker',
    ABSPATH . WPINC . '/classes.php'
);
// ...

// In some plugin file
wp_autoload(
    'My_Plugin_Foo',
    plugin_dir_path( __FILE__ ) . 'foo.class.php'
);
</pre>
<p><strong>Update</strong>:  To clarify, I don&#8217;t mean to imply that this idea would improve WordPress performance.  It&#8217;s just an idea, not a proposal.  I haven&#8217;t done any benchmarking or even naive experimentation.</p>
<p>Conditionally including files involves tradeoffs that need to be evaluated per app.  Also, as Jacob Santos points out in the comments below, conditionally including files from conditionally defined functions is way out there.</p>
<p>I might call the idea clever, but it&#8217;s not necessarily good <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mdawaffe.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mdawaffe.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=69&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mdawaffe.wordpress.com/2009/03/31/wordpress-__autoload-idea/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4d346581a3340e32cf93703c9ce46bd4?s=96&#38;d=monsterid&#38;r=R" medium="image">
			<media:title type="html">mdawaffe</media:title>
		</media:content>
	</item>
		<item>
		<title>Post Revisions in WordPress 2.6</title>
		<link>http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/</link>
		<comments>http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/#comments</comments>
		<pubDate>Thu, 22 May 2008 22:41:51 +0000</pubDate>
		<dc:creator>Mike Adams (mdawaffe)</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mdawaffe.wordpress.com/?p=63</guid>
		<description><![CDATA[Have you ever saved a post on your blog only to realize later that you accidentally erased a critical paragraph? Ever worked on a blog with multiple authors and needed to keep a log of who changed what and when? &#8230; <a href="http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=63&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Have you ever saved a post on your blog only to realize later that you accidentally erased a critical paragraph?  Ever worked on a blog with multiple authors and needed to keep a log of who changed what and when?</p>
<p>WordPress should store a history of all your posts.  You&#8217;d get protection from accidental changes, and you&#8217;d be able to see a clear timeline of the evolution of each of you posts.</p>
<p>Happily, WordPress is awesome!  In the upcoming WordPress 2.6 release, the feature exists and rules!</p>
<p> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And check out the pretty colors!</p>

<a href='http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/post-revisions-1/' title='Post Revisions'><img data-liked='0' data-reblogged='0' data-attachment-id="64" data-orig-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-1.png" data-orig-size="1010,933" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Post Revisions" data-image-description="" data-medium-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-1.png?w=300" data-large-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-1.png?w=640" width="150" height="138" src="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-1.png?w=150&#038;h=138" class="attachment-thumbnail" alt="Diff of two revisions" /></a>
<a href='http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/post-revisions-2/' title='More Post Revisions'><img data-liked='0' data-reblogged='0' data-attachment-id="65" data-orig-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-2.png" data-orig-size="995,986" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="More Post Revisions" data-image-description="" data-medium-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-2.png?w=300" data-large-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-2.png?w=640" width="150" height="148" src="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-2.png?w=150&#038;h=148" class="attachment-thumbnail" alt="Another Diff" /></a>
<a href='http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/post-revisions-3/' title='Post Revisions Meta Box'><img data-liked='0' data-reblogged='0' data-attachment-id="66" data-orig-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-3.png" data-orig-size="1010,468" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Post Revisions Meta Box" data-image-description="" data-medium-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-3.png?w=300" data-large-file="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-3.png?w=640" width="150" height="69" src="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-3.png?w=150&#038;h=69" class="attachment-thumbnail" alt="Post Revisions on the Write Screen" /></a>

<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mdawaffe.wordpress.com/63/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mdawaffe.wordpress.com/63/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mdawaffe.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mdawaffe.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=63&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mdawaffe.wordpress.com/2008/05/22/post-revisions-in-wordpress-26/feed/</wfw:commentRss>
		<slash:comments>173</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4d346581a3340e32cf93703c9ce46bd4?s=96&#38;d=monsterid&#38;r=R" medium="image">
			<media:title type="html">mdawaffe</media:title>
		</media:content>

		<media:content url="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-1.png?w=150" medium="image">
			<media:title type="html">Diff of two revisions</media:title>
		</media:content>

		<media:content url="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-2.png?w=150" medium="image">
			<media:title type="html">Another Diff</media:title>
		</media:content>

		<media:content url="http://mdawaffe.files.wordpress.com/2008/05/post-revisions-3.png?w=150" medium="image">
			<media:title type="html">Post Revisions on the Write Screen</media:title>
		</media:content>
	</item>
		<item>
		<title>Improved Post and Page management in WordPress</title>
		<link>http://mdawaffe.wordpress.com/2007/05/29/improved-post-and-page-management-in-wordpress/</link>
		<comments>http://mdawaffe.wordpress.com/2007/05/29/improved-post-and-page-management-in-wordpress/#comments</comments>
		<pubDate>Tue, 29 May 2007 05:44:50 +0000</pubDate>
		<dc:creator>Mike Adams (mdawaffe)</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mdawaffe.wordpress.com/2007/05/29/improved-post-and-page-management-in-wordpress/</guid>
		<description><![CDATA[Managing thousands of posts and dozens of drafts will be much easier in the upcoming WordPress 2.3 thanks to some revamped backend code and admin interfaces. First, the interface changes. In Manage -&#62; Posts you can currently look for posts &#8230; <a href="http://mdawaffe.wordpress.com/2007/05/29/improved-post-and-page-management-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=28&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Managing thousands of posts and dozens of drafts will be much easier in the upcoming <a href="http://trac.wordpress.org/milestone/2.3">WordPress 2.3</a> thanks to some revamped backend code and admin interfaces.</p>
<p>First, the interface changes.  In Manage -&gt; Posts you can currently look for posts by search term, or browse by month or category, but <em>only one of these things at a time</em>.</p>
<p>In WordPress 2.3 (or currently on WordPress.com), you&#8217;ll be able to filter by search term, post type (draft, private, scheduled for future publishing, or published), author, month published, and category.  You&#8217;ll also be able to <em>combine any or all of those filters and do them all at once</em>:</p>
<p><a href='http://mdawaffe.files.wordpress.com/2007/05/wordpress-23-manage-posts-query-form.png' title='wordpress-23-manage-posts-query-form.png'><img src='http://mdawaffe.files.wordpress.com/2007/05/wordpress-23-manage-posts-query-form.png?w=640' style="width:450px;" /></a></p>
<p>so you&#8217;ll be able to ask for all published posts written by Lion-O during May of 2007, filed in the &#8220;cartoons from the eighties&#8221; category, and matching the phrase &#8220;Mumm-Ra, the Ever-Living&#8221;.  That was a hard list of posts to come by until 2.3.</p>
<p><a href='http://mdawaffe.files.wordpress.com/2007/05/wordpress-23-manage-posts-query.png' title='wordpress-23-manage-posts-query.png'><img src='http://mdawaffe.files.wordpress.com/2007/05/wordpress-23-manage-posts-query.png?w=640' style="width:450px;" /></a></p>
<p>Manage -&gt; Pages will be getting a similar face lift; you&#8217;ll be able to filter by search term, author and page type (draft, private, or published).</p>
<p><a href="http://wordpress.org/extend/ideas/topic.php?id=7">Better draft management</a>, in particular, has consistently been one of the most frequently requested improvements in WordPress, and these changes are a big piece of that.</p>
<p>Neat huh?</p>
<p>Secondly, the back end changes.  The <code>WP_Query</code> class can now select posts by <code>post_status</code> (draft, future, private, publish).  This makes it trivial to use <code>query_posts()</code> and <code>wp()</code> for such queries; no more need for kludgey filters and hacks.</p>
<p>WordPress 2.3 comin&#8217;, at you soon.  Be there!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mdawaffe.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mdawaffe.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mdawaffe.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mdawaffe.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=28&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mdawaffe.wordpress.com/2007/05/29/improved-post-and-page-management-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4d346581a3340e32cf93703c9ce46bd4?s=96&#38;d=monsterid&#38;r=R" medium="image">
			<media:title type="html">mdawaffe</media:title>
		</media:content>

		<media:content url="http://mdawaffe.files.wordpress.com/2007/05/wordpress-23-manage-posts-query-form.png" medium="image" />

		<media:content url="http://mdawaffe.files.wordpress.com/2007/05/wordpress-23-manage-posts-query.png" medium="image" />
	</item>
		<item>
		<title>Hitting WordPress Attachment Handling</title>
		<link>http://mdawaffe.wordpress.com/2006/12/05/hitting-wordpress-attachment-handling/</link>
		<comments>http://mdawaffe.wordpress.com/2006/12/05/hitting-wordpress-attachment-handling/#comments</comments>
		<pubDate>Tue, 05 Dec 2006 23:54:28 +0000</pubDate>
		<dc:creator>Mike Adams (mdawaffe)</dc:creator>
				<category><![CDATA[note to self]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress.com]]></category>

		<guid isPermaLink="false">http://mdawaffe.wordpress.com/2006/12/05/hitting-wordpress-attachment-handling/</guid>
		<description><![CDATA[In debugging some stuff here on WordPress.com, I dived (once more) into the image handling guts of WordPress. A while ago, I revamped WordPress&#8217; inline uploading functionality to be more pluggable, cacheable, maintainable and (hopefully) intuitive. A hundred bugs later, &#8230; <a href="http://mdawaffe.wordpress.com/2006/12/05/hitting-wordpress-attachment-handling/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=22&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In debugging some stuff here on WordPress.com, I dived (once more) into the image handling guts of WordPress.</p>
<p>A while ago, I revamped WordPress&#8217; inline uploading functionality to be more pluggable, cacheable, maintainable and (hopefully) intuitive.  A hundred bugs later, it seems to be working pretty well.</p>
<p>This time around, the issue was not how WP displayed the data, but how it stores it.</p>
<p>In trying to make things leaner and meaner on WordPress.com, we reworked some of the behind-the-scenes directory structures on our servers.  This should have been totally transparent to the user, but, of course, it wasn&#8217;t.  It broke our image handling.</p>
<p>Each file uploaded to WordPress is stored as a special type of post called an &#8220;attachment&#8221;.  In the post and postmeta tables, WordPress stores things like file URL, file path on the server, image dimensions, image thumbnail info, etc.  So to figure out anything we want about an uploaded file, all we have to do is essentially <code>get_post()</code> and a few <code>get_post_meta()</code>s.  Sounds great.</p>
<p>It&#8217;s not.</p>
<p>Two reasons:</p>
<ol>
<li>To answer a question like &#8220;Where is this file located on the server&#8221;, we have to <code>get_post_meta()</code> every time for the answer.  With such a generic function, it&#8217;s impossible for plugins to filter that data on the fly even for this really simple question.</li>
<li>WordPress stores the data in a <em>really</em> inconvenient way; everything is absolute: paths, urls, you name it.</li>
</ol>
<p>Because of the absolute paths, lack of API, and the aforementioned directory restructuring, we had hardcoded into our DB tens of thousands (a blind guess) of incorrect file locations and no way to filter them.  Doing DB updates across hundreds of thousands of tables (not a blind guess) replicated on dozens of servers was not an option.</p>
<p>Partial solution (now implemented in WordPress core): Write a basic API for getting and putting the data.  <code>wp_get_attachment_metadata()</code>, <code>wp_update_attachment_metadata()</code>, <code>get_attached_file()</code>, <code>update_attached_file()</code> (the lack of parallelism between function names, and the ambiguity in those names is an historical artifact) are all nicely filterable.</p>
<p>Improvements that still could be made: Don&#8217;t store absolute data.  This is better for portability too. (Exceptition: guid &#8211; but don&#8217;t use it for the URL).</p>
<p>Related improvements that could be made:</p>
<ul>
<li><code>wp_get_attachment_url()</code></li>
<li><code>wp_get_thumbnail_file()</code></li>
<li><code>wp_get_thumbnail_url()</code></li>
<li><code>wp_attachment_is_image()</code></li>
<li><code>wp_mime_type_icon()</code></li>
<li>Rework <code>get_attachment_icon()</code> given the above</li>
<li>Kill reliance on or rework <code>get_attachment_innerHTML()</code> (see above)</li>
</ul>
<p>Vaguely related improvements that could be made:</p>
<ul>
<li><code>wp_handle_upload()</code> is a little awkward (but nice and robust!).  Maybe wrap it?  That might be silly.</li>
<li><code>wp_generate_thumbnail_filename()</code></li>
<li>Make thumbnail creation hookable and provide above convenience function</li>
</ul>
<p><ins datetime="2007-01-29T10:17:08+00:00"><strong>Update:</strong>  All of the &#8220;related improvements&#8221; noted above have been made in the recently released WordPress 2.1.  Of the &#8220;vaguely related improvements&#8221; suggested, 2.1 offers hookable thumbnail creation.</ins></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mdawaffe.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mdawaffe.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mdawaffe.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mdawaffe.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mdawaffe.wordpress.com&#038;blog=90&#038;post=22&#038;subd=mdawaffe&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mdawaffe.wordpress.com/2006/12/05/hitting-wordpress-attachment-handling/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/4d346581a3340e32cf93703c9ce46bd4?s=96&#38;d=monsterid&#38;r=R" medium="image">
			<media:title type="html">mdawaffe</media:title>
		</media:content>
	</item>
	</channel>
</rss>