function commentmeta_insert_handler($meta_id, $comment_id = null) { if (empty($comment_id) || wp_get_comment_status($comment_id) != 'spam') { $this->add_ping('db', array('commentmeta' => $meta_id)); } }