title: Delete Page after plugin deactivation code not working
body: <p>I am trying to delete page after plugin deactivate.The code is not working for delete page.</p>
  
  <pre><code>register_activation_hook( __FILE__, 'insert_page' );
  
  function insert_page(){
  // Create post object
  $my_post = array(
    'post_title'    =&gt; 'Menu',
    'post_content'  =&gt; 'Short Code',
    'post_status'   =&gt; 'publish',
    'post_author'   =&gt; get_current_user_id(),
    'post_type'     =&gt; 'page',
  );
  
  // Insert the post into the database
  wp_insert_post( $my_post, '' );
   $newvalue = wp_insert_post( $post, false );
  update_option( 'Menu', $newvalue );
  }
  register_deactivation_hook( __FILE__, 'deactivate_plugin' );
  
  function deactivate_plugin() {
  
  $page = get_page_by_title('Menu');
  wp_delete_post($page); 
  
  }
  </code></pre>
  
  <p>I have even tried <code>wp_delete_post($page, true);</code>. It is also not working. Help me where i am wrong.</p>