<?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>Digging into WordPress &#187; editing</title>
	<atom:link href="http://digwp.com/tag/editing/feed/" rel="self" type="application/rss+xml" />
	<link>http://digwp.com</link>
	<description>Take your WordPress skills to the next level.</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:03:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Leave the Visual Editor ON</title>
		<link>http://digwp.com/2011/05/visual-editor-on/</link>
		<comments>http://digwp.com/2011/05/visual-editor-on/#comments</comments>
		<pubDate>Mon, 23 May 2011 17:56:23 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[editor]]></category>

		<guid isPermaLink="false">http://digwp.com/?p=3867</guid>
		<description><![CDATA[Just a quick reminder to anyone out there that may not know.. Enabling the Visual Editor in your User Profile settings gets you access to both Visual and HTML editors in the Write/Edit Post screen. Just click on either tab above the toolbar to toggle between modes. So you can write your posts in HTML [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder to anyone out there that may not know.. <strong>Enabling the Visual Editor</strong> in your User Profile settings gets you access to both Visual and HTML editors in the Write/Edit Post screen. Just click on either tab above the toolbar to toggle between modes. So you can write your posts in HTML and then jump into the Visual Editor to take advantage of the <strong>new Linking tool</strong>, which makes adding links incredibly easy.</p>
<p><span id="more-3867"></span></p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-06.gif" alt="[ WP 3 Linking Tool ]" /></p>
<p>In previous versions of WordPress, if you enabled the Visual Editor via your User Profile page, that&#8217;s pretty much what you were forced to use. There was no way to leave it enabled and then just choose your preference locally from the Write/Edit post screen, so every time you updated your post, the editor would switch back to visual mode &ndash; even if you repeatedly click the HTML editing-mode button. Older versions of WordPress were like this for quite awhile, and during that time many WP peeps just decided to disable the Visual Editor to avoid the headache and constant switching.</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-05.gif" alt="[ WP 2.3.3 - User Profile Page ]" /></p>
<p>Above is a screenshot of the User Profile page of version 2.3.3. At some point, it switched from &#8220;disabled&#8221; to &#8220;enabled&#8221;, as shown below for WordPress version 3.1.2:</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-07.gif" alt="[ WP 3.1.2 - User Profile Page ]" /></p>
<p>Fast-forward to WordPress 3, and welcome the new streamlined <strong>Linking Tool</strong> that <em>only works in visual-editing mode</em>. It&#8217;s an awesome tool that makes internal linking almost fun, but unfortunately it is <strong>not available with the HTML editor</strong>. So all of those seasoned WP users who&#8217;ve been conditioned to disable the Visual Editor during setup are now completely missing out on the awesomeness of the new Link Tool.</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-01.gif" alt="" /></p>
<p>I don&#8217;t know when it happened (which version), but somewhere along the way, WordPress started <em>remembering your editing preferences</em> right there in the Write/Edit post screen, so it&#8217;s no longer necessary to &#8220;Disable the Visual Editor&#8221; next time you&#8217;re setting up a site. Sure you can still disable it if you want to, but why? Leaving it enabled <em>gives you the option</em> to choose which editor to use while actually writing your post. This gives you access to WordPress&#8217; new Link Tool without sacrificing your ability to compose in HTML mode.</p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-02.gif" alt="" /></p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-03.gif" alt="" /></p>
<p><img src="http://digwp.com/wp-content/blog-images/visual-editor-04.gif" alt="" /></p>
<p>Then again, I may be totally wrong and everyone already knows about this. I hope that&#8217;s the case, because the new Link tool is super useful and worth a quick jump into the Visual Editor.</p>
<hr />
<p><small>© 2011 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2011/05/visual-editor-on/">Permalink</a> | <a href="http://digwp.com/2011/05/visual-editor-on/#comments">16 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2011/05/visual-editor-on/&title=Leave the Visual Editor ON">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/admin/" rel="tag">Admin</a>, <a href="http://digwp.com/tag/editing/" rel="tag">editing</a>, <a href="http://digwp.com/tag/editor/" rel="tag">editor</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2011/05/visual-editor-on/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Mastering WordPress Post-Revisioning and Auto-Save Features</title>
		<link>http://digwp.com/2009/07/mastering-wordpress-post-revisioning-and-auto-save-features/</link>
		<comments>http://digwp.com/2009/07/mastering-wordpress-post-revisioning-and-auto-save-features/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 06:06:25 +0000</pubDate>
		<dc:creator>Jeff Starr</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://diggingintowordpress.com/?p=344</guid>
		<description><![CDATA[Not everyone loves the post-revisioning feature of WordPress. In fact, some people can&#8217;t stand it. On the one hand, it&#8217;s nice to have a library of post-draft revisions to drudge through if you should ever make a mistake. On the other hand, multiple copies of every post is a great way to bloat your database [...]]]></description>
			<content:encoded><![CDATA[<p>Not everyone <em>loves</em> the post-revisioning feature of WordPress. In fact, some people can&rsquo;t stand it. On the one hand, it&rsquo;s nice to have a library of post-draft revisions to drudge through if you should ever make a mistake. On the other hand, multiple copies of <em>every</em> post is a great way to bloat your database with otherwise useless information. </p>
<p>Then, to complicate matters, WordPress&rsquo; auto-save functionality seems to have a mind of its own, at times interfering in the revisioning process even when post-revisioning has been disabled. Taken together, these post-revisioning and auto-save features have been known to confuse and frustrate WordPress users.</p>
<p>In this article, I explain how to take full control of WordPress&rsquo; version-revision and auto-save functionality. We&rsquo;ll explore how these features work, why they don&rsquo;t, when they clash, and how to stop the madness once and for all. </p>
<p><span id="more-344"></span></p>
<h3>WordPress AutoSave Feature</h3>
<p>WordPress implemented the AutoSave feature in version 2.1. Its function is to periodically (every 60 seconds by default) and automatically save your post while you work. Aside from the <a href="http://perishablepress.com/press/2008/03/17/wordpress-tip-careful-with-that-autosave-eugene/" title="WordPress Tip: Careful with that Autosave, Eugene">occasional hiccup</a>, AutoSave works great and is a genuine benefit to most WordPress users. Unlike version revisioning, AutoSave does not create a new database entry for every save. Instead, a single database entry is created for each post and is updated with each AutoSave cycle. AutoSave isn&rsquo;t perfect, however, and many folks find the time interval between saves either too brief or too long. Fortunately, WordPress makes it easy to modify the autosave interval with a simple <a href="http://digwp.com/2009/06/wordpress-configuration-tricks/" title="WordPress Configuration Tricks">configuration trick</a>:</p>
<p><code>define('AUTOSAVE_INTERVAL', 300); // in seconds</code></p>
<p>Simply specify your desired autosave interval (in seconds) and add to your <code>wp-config.php</code> file to enjoy immediate results.</p>
<p>If you are one of the rare individuals who prefers to write <em>without</em> the autosave feature, here is an easy way to turn it off:</p>
<pre><code>function disable_autosave() {
	wp_deregister_script('autosave');
}
add_action('wp_print_scripts','disable_autosave');</code></pre>
<p>Just add that slice of code to your theme&rsquo;s <code>functions.php</code> and say goodbye to Autosave!</p>
<h3>WordPress Post Revisioning Feature</h3>
<p>WordPress implemented Post Revisioning (aka Version Revisioning) in version 2.6. Its function is to record changes made to your documents by storing unique revisions in the database. While this feature may benefit a few users, it is widely understood that most WordPress users have no need for this level of functionality. In my humble opinion, the revisioning &ldquo;feature&rdquo; is overkill and completely excessive. It should have been left out of the core (i.e., released as a plugin) or there should be an Admin option to completely disable it. Post revisioning creates extraneous database content and, in my experience, functions inconsistently and unpredictably. Fortunately, there is an easy way to disable it by adding the following line to your <code>wp-config.php</code> file:</p>
<p><code>define('WP_POST_REVISIONS',false);</code></p>
<p>Or, if you prefer to keep the versioning functionality but limit the number of allowed revisions, add the following line to your <code>wp-config.php</code> file:</p>
<p><code>define('WP_POST_REVISIONS',3);</code></p>
<p>There is even a way to clean up your database by deleting all post-revision data. <a href="http://andreineculau.com/blog/2008/07/delete-wordpress-26-revisions/" title="Delete WordPress 2.6 Revisions">Andrei Neculau</a> shows us how via this handy little <acronym title="Structured Query Language">SQL</acronym> command:</p>
<pre><code>DELETE a,b,c FROM wp_posts a 
LEFT JOIN wp_term_relationships b 
ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c 
ON (a.ID = c.post_id) WHERE a.post_type = 'revision';</code></pre>
<p>That magical query will nuke all post-revisions and associated meta-data from the database.</p>
<h3>AutoSave + Versioning = Chaos?</h3>
<p>So far, everything presented in this article is fairly straightforward. At this point, I would like to discuss a persistent post-reversioning issue that continues to rear its ugly head even when post revisioning is disabled via the previously prescribed method. Apparently, there is no way to disable WordPress&rsquo; post-revisioning functionality. It continues to work behind the scenes even after setting the <code>WP_POST_REVISIONS</code> variable to <code>false</code> in the configuration file.</p>
<p>Why do I say this? Because I have experienced the following series of events with several different WordPress installations:</p>
<ol>
<li>Install WordPress</li>
<li>Disable Post-Revisioning</li>
<li>Write a post, save it, edit it</li>
<li>Notice a message that says something like this:</li>
</ol>
<blockquote><p><em>There is an autosave of this page that is more recent than the version below.</em></p></blockquote>
<p>I can see how the timestamp on an autosave may conflict with the actual post during post editing, but when the database is examined after receiving this message, multiple post revisions are usually found. Apparently, WordPress is still saving post revisions behind the scenes even when revisioning has been disabled. With revisioning disabled, an option to compare reversions will never be shown explicitly, but the comparative functionality continues to operate. Further, there is no way to examine a list of the unintended post revisions. They exist in the database, but not in the Admin area. Thus, to see and compare these revisions, you need to do it manually. Here is a recipe for doing so:</p>
<ul>
<li>Log into a database interface like phpMyAdmin</li>
<li>Run the following <acronym title="Structured Query Language">SQL</acronym> query:</li>
</ul>
<pre><code>SELECT * FROM `wp_posts` WHERE post_type = "revision"</code></pre>
<p>If this query returns results, WordPress has been saving revisions without your consent. To delete these revisions and all of their post data, see the method prescribed above. To see and compare different revisions in the WordPress Admin before taking action, continue with the following steps (screenshot provided for clarity):</p>
<p><img src="http://digwp.com/wp-content/blog-images/wordpress-revisions.gif" alt="[ Screenshot: Post ID columns as seen via phpMyAdmin ]" /><br /><small>Post ID columns as seen via phpMyAdmin</small></p>
<ul>
<li>Determine the <strong>original post ID</strong> for each set of revisions</li>
<li>Determine the <strong>revision post ID</strong> of each individual revision</li>
<li>For each set of revisions that you would like to compare, enter the following URL in your browser&rsquo;s address bar:</li>
</ul>
<pre><code>http://domain.tld/wp-admin/revision.php?action=diff&amp;right=X&amp;left=Y</code></pre>
<p>Edit the domain to match your own, and then replace &ldquo;<code>X</code>&rdquo; and &ldquo;<code>Y</code>&rdquo; with the revision post IDs of any two revisions you would like to compare (order does not seem to matter).</p>
<p>Repeat these steps to compare as many revisions as is necessary. To view an individual revision, edit the following code with the ID of the desired revision and enter it into your browser&rsquo;s address bar:</p>
<pre><code>http://domain.tld/wp-admin/revision.php?revision=N</code></pre>
<p>Once you have evaluated your autosaved revisions, they may be safely deleted, either all at once via the <acronym title="Structured Query Language">SQL</acronym> query provided above, or else individually by simply clicking the delete button (the red &ldquo;x&rdquo; in phpMyAdmin) next to each revision in the <code>wp_posts</code> table.</p>
<h3>Share your experience</h3>
<p>I&rsquo;m curious to know what other WordPress users think of the post-revisioning and auto-save features. Do you use them, and if so, how are they beneficial? Have you ever experienced unexpected or unexplainable behavior while writing a post while using post-revisioning functionality? It would also be interesting to find out how many people think the post-revisioning feature should have been included in the WordPress core.</p>
<hr />
<p><small>© 2009 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2009/07/mastering-wordpress-post-revisioning-and-auto-save-features/">Permalink</a> | <a href="http://digwp.com/2009/07/mastering-wordpress-post-revisioning-and-auto-save-features/#comments">14 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2009/07/mastering-wordpress-post-revisioning-and-auto-save-features/&title=Mastering WordPress Post-Revisioning and Auto-Save Features">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/database/" rel="tag">database</a>, <a href="http://digwp.com/tag/editing/" rel="tag">editing</a>, <a href="http://digwp.com/tag/optimization/" rel="tag">optimization</a>, <a href="http://digwp.com/tag/performance/" rel="tag">performance</a>, <a href="http://digwp.com/tag/tips/" rel="tag">tips</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2009/07/mastering-wordpress-post-revisioning-and-auto-save-features/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Add/Remove Buttons from WordPress Write Panel</title>
		<link>http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/</link>
		<comments>http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:07:44 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://diggingintowordpress.com/?p=73</guid>
		<description><![CDATA[One of the features of WordPress 2.8 was a &#8220;increased speed of the Admin area&#8221;, which cited compressed JavaScript files as the reason for the speed increase. One of those files that was compressed was the file quicktags.js in the wp-includes/js directory. When you have the visual editor turned off, this is the file responsible [...]]]></description>
			<content:encoded><![CDATA[<p>One of the features of WordPress 2.8 was a &#8220;increased speed of the Admin area&#8221;, which cited compressed JavaScript files as the reason for the speed increase. One of those files that was compressed was the file <code>quicktags.js</code> in the <code>wp-includes/js</code> directory.</p>
<p><strong>When you have the visual editor turned off,</strong> this is the file responsible for created the buttons above the write panel. You know, the buttons like b for strong tags, i for em tags, b-quote for blockquote tags, etc. Personally I much prefer this to the Visual Editor, as I can see exactly what tags are being applied to my content. </p>
<p><img src="http://digwp.com/wp-content/blog-images/tags.png" width="457" height="34" alt="" title="" /></p>
<p><span id="more-73"></span></p>
<p>But those default buttons are often not quite enough. I like to have a few more buttons easily available to me, like ones for h3-h5 tags, one that will wrap text in both code <strong>and</strong> pre tags, and one for a float-clearing div.</p>
<p>But remember in WordPress 2.8, this quicktags.js file is now compressed so it cannot be easily altered to include these new buttons like it used to. Thankfully they left a non-compressed version of the file in there as well, called <code>quicktags.dev.js</code>. To use this instead, just rename the quicktags.js file something like quicktags.ORIG.js and rename <code>quicktags.dev.js</code> into <code>quicktags.js</code>.</p>
<p>To add a new h3 button, add a block of code like this, amongst all the other similar code blocks:</p>
<pre><code>edButtons[edButtons.length] =
new edButton('ed_h3'
,'h3'
,'&amp;lt;h3&amp;gt;'
,'&amp;lt;/h3&amp;gt;'
,'h3'
);</code></pre>
<p>Force refresh your Edit Post page and you should see the new button!</p>
<p><img src="http://digwp.com/wp-content/blog-images/tags2.png" width="443" height="35" alt="" title="" /></p>
<hr />
<p><small>© 2009 <a href="http://digwp.com">Digging into WordPress</a> | <a href="http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/">Permalink</a> | <a href="http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/#comments">20 comments</a> | Add to <a href="http://del.icio.us/post?url=http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/&title=Add/Remove Buttons from WordPress Write Panel">del.icio.us</a> | Post tags: <a href="http://digwp.com/tag/button/" rel="tag">button</a>, <a href="http://digwp.com/tag/editing/" rel="tag">editing</a>, <a href="http://digwp.com/tag/tags/" rel="tag">tags</a><br/></small></p>]]></content:encoded>
			<wfw:commentRss>http://digwp.com/2009/06/addremove-buttons-from-wordpress-write-panel/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

