I’m working on a WordPress multisite plugin that uses a global table to store logs. When a user performs a certain action on my site, I’m executing a function similar to this one:
function add_log($source, $user_id, $action, $status) {
global $wpdb, $blog_id;
$table_name = $wpdb-&