You appear to be a bot. Output may be restricted
Description
Perform category republishing for selected categoriesCall oik_batchmove_category_republish for each category and target time The rescheduling is performed in the order specified on the admin page which is not necessarily by Category name OR time. If you use multiple categories on your posts it is potentially possible to reschedule posts in a particular category 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 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 category, but it probably won't affect the database access.
Usage
oik_batchmove_lazy_category_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_category_republish( $verbose=false) { $bw_bmcs = get_option( "bw_bmcs" ); if ( is_array( $bw_bmcs) && count( $bw_bmcs )) { oik_require( "includes/bw_posts.php" ); bw_delete_all_meta_key( "_do_not_reschedule", "0" ); foreach ( $bw_bmcs as $bmc => $data ) { oik_batchmove_category_republish( $data['args']['category'], $data['args']['time'], $verbose ); } } }View on GitHub View on Trac