title: Add metabox if there is at least one post available
body: <p>So I am building a WordPress Dashboard widget which will showcase all posts &amp; pages where a Gutenberg Block is active.</p>
  <p>The below code does it's job and pulls in an array based on <code>get_posts()</code>.</p>
  <p><strong>Here is what I'm attempting to do</strong>:</p>
  <ol>
  <li>Is there a way that I can invoke the <code>add_action</code> and the <code>pardot_dashboard_widget()</code> function <strong>ONLY</strong> if there is at least one or more posts in <code>get_posts()</code>? If it's an empty array, don't even bother creating the metabox.</li>
  </ol>
  <p><strong>Here is the code</strong>:</p>
  <pre><code>/**
   * Pardot Widget for Dashboard
   */
  function pardot_dashboard_widget()
  {
      add_meta_box(
          'pardot_dashboard_meta_box',
          esc_html__( 'Pardot Form Locations', 'wporg' ),
          'pardot_dashboard_stats',
          'dashboard',
          'side', 'high'
      );
  }
  add_action('wp_dashboard_setup', 'pardot_dashboard_widget');
  
  function pardot_dashboard_stats()
  {
      $args = [
          's'         =&gt; '&lt;!-- wp:acf/pardot-form ',
          'sentence'  =&gt; 1,
          'post_type' =&gt; [
              'post',
              'page'
          ],
      ];
      $pardot_form_query = get_posts($args);
      if (!$pardot_form_query) {
         echo 'There are no active pardot forms available.';
      }
  }
  </code></pre>