• jorgitobg

    (@jorgitobg)


    Hi,

    Im just creating a new custom post status:

    ————————————————–
    function reviewed_post_status(){
    register_post_status( ‘reviewed’, array(
    ‘label’ => _x( ‘Unread’, ‘post’ ),
    ‘protected’ => true,
    ‘_builtin’ => true, /* internal use only. */
    ‘public’ => false,
    ‘exclude_from_search’ => false,
    ‘show_in_admin_all_list’ => true,
    ‘show_in_admin_status_list’ => true,
    ‘label_count’ => _n_noop( ‘Revisadas <span class=”count”>(%s)</span>’, ‘Revisadas <span class=”count”>(%s)</span>’ ),
    ) );
    }
    add_action( ‘init’, ‘reviewed_post_status’ );
    ————————————————–

    Also I have added to post edit and quick edit screens without problems…

    My problem is what after saving this new custom status “reviewed” wordpress update post_date and post_date_gmt, like this post were published or scheduled….. I need a custom post status before published or scheduled.

    How can I make wordpress dont update post_date and post_date_gmt when this new custom status “reviewed” is saved?

    I found a several documentation on how to hack core files, but I need other clean alternatives:

    https://tharshetests.wordpress.com/2015/01/16/how-does-wordpress-know-if-a-pending-post-hasnt-been-published-yet/

    Do you know how to do this like “edit flow” plugin?

    Regards,

  • The topic ‘create custom post status do not update post_date_gmt’ is closed to new replies.