title: Wordpress: why is the init hook invoked multiple times?
body: <p>I am at a real loss at this problem. I just created a plug-in, and to log the actions in the plug-in (as I can't see the output of the processing), I added a hook to init like so:</p>
  
  <pre><code>add_action('init', 'test_hook');
  
  function test_hook()
  {
  
     global $wpdb;
     $message = "Some informational message here";
     $wpdb-&gt;insert("pq_logs", array("message"=&gt;$message), array("%s"));
  
  }
  </code></pre>
  
  <p>What's bringing me into submission is that instead of getting one line of entry per page load, I get from 1 to 8 row entries of the <strong>same log, with different time stamps</strong>. The number of entries that is entered is inconsistent and seems to be totally in random (sometimes I'm thinking it depends on the current weather conditions or the stock exchange index). </p>
  
  <p>I did the standard checks, turned off all other plug-ins, but to no avail. I searched for the code for anything that does <code>do_action('init')</code>, but I was only pointed out to one call at <code>wp-settings.php</code>. </p>
  
  <p>Have you also encountered? What did you do?</p>