0

Refering to Post status because it's not allowed to do a question on a answer ?!
Original post is from Bubka Gob and the answer came from Chris O .

I have add their code to functions.php:

add_action('post_submitbox_misc_actions', 'send_for_correction_button');
function send_for_correction_button()
{
    //global $post;
    echo '
    
        ';
}
add_filter( 'wp_insert_post_data' , 'my_filter_handler' , '99', 2 );
function my_filter_handler( $data , $postarr )
{
    if ($postarr['save'] == 'Send for correction')
        $data['post_status'] = 'on-correction';

    return $data;
}

Because I have following plugin installed: CMS Tree page View I can see the page which is "marked" as on-correction. But as soon this plugin is deactivate the page isn't showing up anymore when I click All Pages.(In back-end/Admin)

Does anyone have a clue/hint or solution? Thanks in advance for time and effort.

(looking forward to a responce because we would love to use this nice solution for the reason that we also have multiple authors.), Sorry if I am wrong and duplicate now because lack of knowledge for the how to respond on excisting answers on stackexchange.com.

1
  • You respond using comments just like this one.
    – Bainternet
    Jun 13, 2012 at 16:57

1 Answer 1

0

That code is part of something bigger, as there are many places where the custom post_status needs to be inserted.

There are two interesting discussions here at WPSE and both point to the use of this plugin: Edit Flow.

Leave a comment in the question you're referring and ask Bubka if he can publish his full code, otherwise... Edit Flow...

1
  • Thank you very much for responding with the links, will read them first your before doing some else. (Was not aware of the discussions which already where going on, my mistake).
    – Charles
    Jun 13, 2012 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.