Play .MKV’s in Windows Media Center (WMC)

For a long time I had resisted converting my DVD and Blu-Ray disks into any other format because I didn’t want to lose any quality.  I had lived by this rule for a long time, and thankfully companies like QNAP and Thecus came to my storage rescue.  However, the day has come where the cost of storing all the extra garbage that comes along with these movies has opened my eyes to benefits conversions.  With that, I have began converting my movie collection to a format that allows me to lose all the excess fat, but keep my movie loss-less. Read More…

wordpress-thumbnail-logo
  • EmailPrint This PostFeedShareCOD

I can't tell you how many times I have written an article, hit publish, then realized that I made some mistakes.  It doesn't matter how much I proofread a post, it happens all the time.  With that, our readers get these articles delivered to them through my feed.  Wouldn't it be nice if I could delay the feed a bit, just in case I have to make a change? Well, you can... and this is how.

The code below will delay your feed for 30 minutes.  You can change the time it takes by editing the integer and designating the time in minutes, hours, days, etc.

1. edit your theme's functions.php file
2. paste the following code between the <?php and the ?>

//--------------------------------------------------------------------------
// Start Delay Feed
// --------------------------------------------------------------------------
function publish_later_on_feed($where) {
	global $wpdb;
	if (is_feed()) {
		// timestamp in WP-format
		$now = gmdate('Y-m-d H:i:s');
		// value for wait; + device
		$wait = '30'; // integer
		// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
		$device = 'MINUTE'; // MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
		// add SQL-sytax to default $where
		$where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
	}
	return $where;
}
add_filter('posts_where', 'publish_later_on_feed');
// --------------------------------------------------------------------------
// End Delay Feed
// --------------------------------------------------------------------------

Note: These functions are not of my own creation, simply things I have found along the way.  If you are the author of this function, please let me know so I can properly credit you with your work!

Share to Facebook Share to Twitter Stumble It Digg Linked In Delicious Tumblr

Joe DiFiglia has written 226 Articles at C.O.D.


In early 2000 I became increasingly frustrated with hardware review sites praising less than satisfactory products. The saying: “if you want something done right, do it yourself” applies here. I wasn’t satisfied, so I did it myself; and here we are years later.