title: wp_query is empty in admin_init
body: <p>I'm developing a plugin and one of the issues I am running into is that I cannot get the post id within a function assigned to the admin_init hook.  </p>
  
  <p>I tried a few different methods; but, they all seem to use the $wp_query.</p>
  
  <p>Below is a simple version the code I am using. I implemented the code like this just now and ran it by viewing the "post edit" page</p>
  
  <pre><code>add_action('admin_init','do_optional_featured_article');
  function do_optional_featured_article()
  {
      global $wp_query;
      echo "&lt;pre&gt;";
      print_r($wp_query);
      echo "&lt;/pre&gt;";
      die();
  }
  </code></pre>
  
  <p>$wp_query is a mostly empty array, notably, the post member is empty</p>
  
  <p>-- EDIT --</p>
  
  <p>I got some advice over at wordpress.stackexchange  and added in this function: </p>
  
  <pre><code>function get_admin_post()
  {
      if( isset($_GET['post']) ) 
      {
          $post_id = absint($_GET['post']); // Always sanitize
          $post = get_post( $post_id ); // Post Object, like in the Theme loop
          return $post;
      }
      elseif( isset($_POST['post_ID']) )
      {
          $post_id = absint($_POST['post_ID']); // Always sanitize
          $post = get_post( $post_id ); // Post Object, like in the Theme loop
          return $post;
      }
      else 
      {
          return false;
      }
  }
  </code></pre>