changing a post status from custom status to pending. - Wordpress
<p>In my <code>review</code> custom post type, posts should be reviewed twice before publishing.
1) by the administrator and 2) manager.
Thats why i have registered a new custom post status - <code>pending_review</code>.And <code>pending</code> is already built in wordpress.</p>

<p>So now when the review is taken from frontend its <code>post_status</code> is <code>pending_review</code> and its only shown to <code>admin</code> not to <code>manager</code>.And when its transformed from <code>pending_review</code> to <code>review</code> then its shown to manager.Then when manager approve / publish the post its status is changed to <code>pending</code> to <code>publish</code></p>

<p>Now the ques is how i can change status from <code>pending_review</code> to <code>pending</code>.When publish button is pressed in <code>pending_review</code> status.The post is directly published.</p>

<h2>I tried this code</h2>

<pre><code>function reviewed_by_admin( $new_status, $old_status, $post ){
    if( 'review' == get_post_type( $post ) ){
        wp_transition_post_status( 'pending_review', 'pending', $post );
    }
}

if(current_user_can( 'administrator' )){
    add_action( 'pending_review_to_pending', 'reviewed_by_admin', 10, 3 );
}
</code></pre>

<p>But not works</p>