title: How to Fire an Event Only Once on WordPress Post Publish?
body: <p>Thanks for any help with this.</p>
  
  <p>I need to know how to hook wp_insert_post (or whatever is similar and better?) without it firing multiple times.  What is the correct way to do this in WordPress?</p>
  
  <p>For example:</p>
  
  <p>In Plugin.php</p>
  
  <pre><code>add_filter( 'wp_insert_post', 'add_data') );
  ...
  function add_data()
  {
      // This line is outputted twice
      terseErrorLog("This code was executed.");
  }
  </code></pre>