You appear to be a bot. Output may be restricted
Description
Republish a postActions to perform during republishing
- if there are comments
- change post_title: "From the archives: " $post_title
- prepend post_content: "Originally published on " $post_date " <br />"
- update post_date by applying $reschedule using bw_date_adjust()
- or, for category reschedule, set date to current date and the optionally specified time.
- set post_date_gmt to the new post date. This is done to ensure that if the post date is in the future then the post_status will become 'future'
- remove postmeta fields with the following keys: _wpas_done_all, _wpas_skip_nnnnn, etc
Usage
oik_batchmove_republish_post( $post, $cat, $time );
Parameters
- $post
- ( mixed ) required –
- $cat
- ( mixed ) optional –
- $time
- ( mixed ) optional –
Returns
voidTO DO
Also delete any revisions … good thing we didn't in an earlier version since it would have made problem determination harderSource
File name: oik-batchmove/admin/oik-batchmove-cron.phpLines:
1 to 12 of 12
function oik_batchmove_republish_post( $post, $cat=null, $time=null ) { oik_batchmove_handle_comments( $post ); if ( $cat ) { $post->post_date = oik_batchmove_reschedule_cat( $post->post_date, $time ); } else { $post->post_date = oik_batchmove_reschedule( $post->post_date ); } $post->post_date_gmt = $post->post_date; //oik_batchmove_reschedule( $post->post_date_gmt ); // $post->post_status = "future"; wp_update_post( $post ); oik_batchmove_delete_postmeta( $post->ID ); }View on GitHub View on Trac