Why is wp_is_post_revision always false?
-
I am trying to save a revision of a custom post type. This is what I have to check if the post has a parent:
function save_revision( $post ) { if ( $post['submitted'] == true ) { $parent_id = wp_is_post_revision( $post['post_id'] ); ... } } add_action('init', 'save_revision');
The problem is that I always get false for $parent_id even though I know there is a parent post for that post_id.
Any help is appreciated, I have been trying to get this to work forever.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Why is wp_is_post_revision always false?’ is closed to new replies.