[wp-hackers] Allowing future posts
Kaf Oseo
kaf at szub.net
Sat Nov 17 20:00:12 GMT 2007
Ugh. Noticed I missed a little something on this, which would certainly
make visiting individual entries more interesting, but probably not what
anyone expects.
Gonna go with Joost's suggestion for a name, too...
<?php
/*
Plugin Name: The Future is Now!
Description: Display posts with a timestamp in the future.
Version: R1.0.1
*/
function show_future_where($where) {
global $wpdb;
if( !is_single() && !is_page() )
$where .= " OR $wpdb->posts.post_status = 'future' ";
return $where;
}
add_filter('posts_where', 'show_future_where');
?>
-Kaf
More information about the wp-hackers
mailing list