You appear to be a bot. Output may be restricted
Description
Find the oldest date for posts in this category and/or with this tag which are not marked as "_do_not_reschedule"Q. Do we have to delete all those that don't have the "_do_not_reschedule" set?
Usage
$string = oik_batchmove_query_oldest_date( $cat, $tag );
Parameters
- $cat
- ( string ) optional – the category ID
- $tag
- ( string ) optional – the tag ID
Returns
string the post date or nullSource
File name: oik-batchmove/admin/oik-batchmove-cron.phpLines:
1 to 23 of 23
function oik_batchmove_query_oldest_date( $cat=null, $tag=null ) { $post_date = null; $atts = array( "post_type" => "post" , "meta_key" => "_do_not_reschedule" , "meta_compare" => "NOT EXISTS" , "meta_value" => "1" , "order" => "asc" , "orderby" => "date" , "numberposts" => 1 ); if ( $cat ) { $atts['cat'] = $cat; } if ( $tag ) { $atts['tag_id'] = $tag; } $posts = bw_get_posts( $atts ); if ( $posts ) { $post = $posts[0]; $post_date = $post->post_date; } return( $post_date ); }View on GitHub View on Trac