<?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>Kevin J Edwards &#187; WordPress 2.8</title>
	<atom:link href="http://kevinjedwards.com/tag/wordpress-28/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevinjedwards.com</link>
	<description>And this is what I think...</description>
	<lastBuildDate>Thu, 01 Jul 2010 09:24:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to stop WordPress 2.8 from deleting enclosures</title>
		<link>http://kevinjedwards.com/51/how-to-stop-wordpress-28-from-deleting-enclosures/</link>
		<comments>http://kevinjedwards.com/51/how-to-stop-wordpress-28-from-deleting-enclosures/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 08:12:04 +0000</pubDate>
		<dc:creator>kevine</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[2.8]]></category>
		<category><![CDATA[auto-enclosures]]></category>
		<category><![CDATA[Deleting Enclosures]]></category>
		<category><![CDATA[Disappearing Enclosures]]></category>
		<category><![CDATA[Enclosures]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress 2.8]]></category>

		<guid isPermaLink="false">http://kevinjedwards.com/?p=51</guid>
		<description><![CDATA[[update: this bug seems to be fixed in WordPress 2.9 Beta 2] After a couple of days of agony thinking that my WordPress database was seriously messed up, I discovered the bug that was causing enclosures to disappear turns out be considered a &#8220;fix/feature&#8221; by WordPress Org. WordPress 2.8 not only places auto-enclosures like previous [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>[update: this bug seems to be fixed in WordPress 2.9 Beta 2]<br />
</em></strong><br />
After a couple of days of agony thinking that my WordPress database was seriously messed up, I discovered the bug that was causing enclosures to disappear turns out be considered a &#8220;fix/feature&#8221; by WordPress Org.</p>
<p>WordPress 2.8 not only places auto-enclosures like previous versions of WordPress, but it also auto-removes enclosures if there&#8217;s no link to the media file in the post body.</p>
<p>To keep your enclosures from disappearing in 2.8, you can place a link to the media file in your post body&#8230;of course this may be a redundant link or an unwanted link.</p>
<p>Why anyone would want auto-enclosures is beyond me.  This functionality is really annoying and problematic.  It also saves no time as entering the URL in the enclosure field and then using the enclosure to place a download link where the post is displayed is much more efficient&#8230;and logical&#8230;aren&#8217;t these templates we&#8217;re talking about?  Why would we duplicate copy and code in every post?</p>
<p>So to fix this fix without having to place the redundant link to the media file, you need to edit the file at:<br />
../wp-includes/functions.php</p>
<p>Simply delete or comment out lines 1164-1168.  They look like:<br />
<code>	foreach ( $pung as $link_test ) {<br />
		if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post<br />
			$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, $link_test . '%') );<br />
		}<br />
	}</code></p>
<p>Unfortunately of course this code will be added back again if you update WordPress (unless they see the error of their ways).</p>
<p>I would love to offer this as a free plug-in, but I don&#8217;t think there are any hooks for this in the WordPress API.  I could be wrong as I&#8217;m not experienced at all in plug-in development for WordPress.</p>
<p>Discussions about this issue are taking place on <a href="http://wordpress.org/support/topic/287260">WordPress.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevinjedwards.com/51/how-to-stop-wordpress-28-from-deleting-enclosures/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
