title: get_the_ID() function does not return the post id in init hook function
body: <p>Please consider the code:</p>
  
  <pre><code>function mcqac_wp_enqueue_assets() {
  
      if (is_admin()) {
  
          wp_enqueue_script(
              'mcqac-js-admin', // Handle.
              PLUGIN_URL . 'build/main-admin.js',
              array( 'jquery' ), // Dependencies, defined above.
              filemtime( PLUGIN_PATH . 'build/main-admin.js' ), // Version: File modification time.
              true // Enqueue the script in the footer.
          );
  
          $mcqacAdminData = array();
  
          if (get_the_ID()) {
              $mcqacAdminData['options'] = get_post_meta(get_the_ID(), 'mcqac_options', true);
          }
  
          wp_localize_script('mcqac-js-admin', 'mcqacAdminData', $mcqacAdminData);
      }
  }
  
  add_action('init', 'mcqac_wp_enqueue_assets');
  </code></pre>
  
  <p>The <code>get_the_ID()</code> does not return anything when I am in the edit post page. Seems like <code>init</code> action hook is fired before the post query. </p>
  
  <p>What is the solution?</p>