You can use get_post_type
to check type:
function post_updated( $post_id ) {
$post_type = get_post_type($post_id);
// If this isn't a 'book' post, don't update it.
if ( "book" != $post_type ) return;
// the rest of your code...
}
You can use get_post_type
to check type:
function post_updated( $post_id ) {
$post_type = get_post_type($post_id);
// If this isn't a 'book' post, don't update it.
if ( "book" != $post_type ) return;
// the rest of your code...
}