Set page to draft on plugin deactivation
I’m posting this as another solution for you and its based on the page id /* $post_id – The ID of the post you’d like to change. $status – The post status publish|pending|draft|private|static|object|attachment|inherit|future|trash. */ function change_post_status($post_id,$status){ $current_post = get_post( $post_id, ‘ARRAY_A’ ); $current_post[‘post_status’] = $status; return wp_update_post($current_post); } So once you have this function you … Read more