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:
add_action('init', 'test_hook');
function test_hook()
{
global $wpdb;
$message = "Some informational message here";
$wpdb->insert("pq_logs", array("message"=>$message), array("%s"));
}
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 same log, with different time stamps. 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).
I did the standard checks, turned off all other plug-ins, but to no avail. I searched for the code for anything that does do_action('init')
, but I was only pointed out to one call at wp-settings.php
.
Have you also encountered? What did you do?