Marking future dated post as published

Awesome combining both the answers from Mike and Jan I came up with this which works only on the post type in question. We don’t need the conditional of show because the ‘future_show’ hook only grabs the post type of show and updates that.

<?php
    function setup_future_hook() {
        // Replace native future_post function with replacement
        remove_action('future_show','_future_post_hook');
        add_action('future_show','publish_future_post_now');
    }

    function publish_future_post_now($id) {
        wp_publish_post($id);
    }

    add_action('init', 'setup_future_hook');
?>

Leave a Comment

error code: 523