public static function wp_insert_comment($comment_id, $comment) { global $wp_filter; if ($comment->comment_approved == 1) { //posted by a WP user if (isset($wp_filter['wpak_cache_update_new_comment'])) { do_action('wpak_cache_update_new_comment', $comment); } else { WpakCache::delete_web_service_cache('wpak-delete-all-caches'); } } }