Support » Plugin: tao-schedule-update » Scheduled post but keep the same date

  • Resolved minuro


    I have a problem with this.
    First is great that is keeping the url structure after the Scheduled update, but I need to keep the same date post as old version, not to be publish now date as the date when is make the update.
    What I need to change in the plugin to be posted with the old date article before of the schedule.
    In the rest, work great, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter minuro


    Sry, but I have fix it my self, hope that will help others too.
    What I modify is down.

    //create the new post
    $new_post = array(
    ‘menu_order’ => $post->menu_order,
    ‘comment_status’ => $post->comment_status,
    ‘ping_status’ => $post->ping_status,
    ‘post_author’ => $new_author->ID,
    ‘post_content’ => $post->post_content,
    ‘post_excerpt’ => $post->post_excerpt,
    ‘post_mime_type’ => $post->mime_type,
    ‘post_parent’ => $post->ID,
    ‘post_password’ => $post->post_password,
    ‘post_status’ => self::$TAO_PUBLISH_STATUS,
    ‘post_title’ => $post->post_title,
    ‘post_type’ => $post->post_type,
    ‘post_date’ => $post->post_date,

    And here:
    $post->post_date = $orig->post_date; //we need this to get wp to recognize this as a newly updated post
    $post->post_date_gmt = get_gmt_from_date( $post_date );

    Plugin Author Syberspace


    We’ve just released version 1.14. Among the changes is the new filter TAO_ScheduleUpdate\\publish_post_date. This should help you set the desired date for any post that gets published via tao-schedule-update.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Scheduled post but keep the same date’ is closed to new replies.