You appear to be a bot. Output may be restricted
Description
Republish posts with a chosen tag, setting a new published time if required
Usage
oik_batchmove_tag_republish( $tag, $time, $verbose );
Parameters
- $tag
- ( string ) required – The tag ID to republish
- $time
- ( string ) required – the target time in format hh:mmm
- $verbose
- ( bool ) optional – whether or not to display activity
Returns
voidSource
File name: oik-batchmove/admin/oik-batchmove-cron.phpLines:
1 to 24 of 24
function oik_batchmove_tag_republish( $tag, $time, $verbose=false ) { $post_date = oik_batchmove_query_oldest_date( null, $tag ); if ( $post_date ) { $posts = oik_batchmove_query_reposts( $post_date, null, $tag ); if ( $verbose ) { p( "Rescheduling posts for $post_date, tag: $tag, time: $time" ); } if ( $posts ) { foreach ( $posts as $post ) { if ( $verbose ) { p( "Rescheduling: " . $post->ID ); } oik_batchmove_republish_post( $post, $tag, $time ); } } else { $posts = null; p( "No posts to reschedule: $tag" ); } } else { p( "No posts to reschedule for $tag" ); } }View on GitHub View on Trac