You appear to be a bot. Output may be restricted
Description
Perform tag republishing for selected tagsCall oik_batchmove_tag_republish for each tag and target time The rescheduling is performed in the order specified on the admin page which is not necessarily by Tag name OR time. If you use multiple tags on your posts it is potentially possible to reschedule posts in a particular tag for multiple oldest dates. Left as an exercise for the reader to create a test case that will demonstrate this. Prior to the republishing by category/tag we delete ALL post meta records which have a velue of 0. By deleting all the unnecessary keys we can perform a simpler query to avoid the rows where the meta_value is set. In other words it makes it easier for us to find posts that we can reschedule. Over time there may be a whole bunch of archive posts with "_do_not_reschedule" set. We could assign them to a different tag, but it probably won't affect the database access.
Usage
oik_batchmove_lazy_tag_republish( $verbose );
Parameters
- $verbose
- ( bool ) optional – set true if you want messages in admin, false for CRON
Returns
voidSource
File name: oik-batchmove/admin/oik-batchmove-cron.phpLines:
function oik_batchmove_lazy_tag_republish( $verbose=false) { $bw_bmts = get_option( "bw_bmts" ); if ( is_array( $bw_bmts) && count( $bw_bmts )) { oik_require( "includes/bw_posts.php" ); bw_delete_all_meta_key( "_do_not_reschedule", "0" ); foreach ( $bw_bmts as $bmc => $data ) { oik_batchmove_tag_republish( $data['args']['tag'], $data['args']['time'], $verbose ); } } }View on GitHub View on Trac