What I need to do is inspect the content of the post and title and based on the inspection, redirect to a different page. To do this, I need to know if a "POST" action is for saving a post. How to detect this?

1 Answer 1


Take a look at the Plugin API/Action Reference: Actions Run During an Admin Page Request..

Then add something simple to the appropriate hook:

function wpse19260_inspect_post()
    echo '<pre>';
        // print_r( $_POST );
        echo $_POST->ID;
        echo $_POST->post_content;
        echo $_POST->post_title
    echo '<pre>';
add_action( 'publish_post', 'wpse19260_inspect_post' );

Your Answer

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

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