if ( null !==
$pre ) { return $pre;
} $blog_prefix =
$wpdb->
get_blog_prefix( $site_id );
$result = array
();
if ( 'time' ===
$strategy ) { if ( is_multisite() &&
get_current_blog_id() !=
$site_id ) { switch_to_blog( $site_id );
$avail_roles =
wp_roles()->
get_names();
restore_current_blog();
} else { $avail_roles =
wp_roles()->
get_names();
} // Build a CPU-intensive query that will return concise information.
$select_count = array
();
foreach ( $avail_roles as $this_role =>
$name ) { $select_count[] =
$wpdb->
prepare( 'COUNT(NULLIF(`meta_value` LIKE %s, false))', '%' .
$wpdb->
esc_like( '"' .
$this_role . '"'
) . '%'
);
} $select_count[] = "COUNT(NULLIF(`meta_value` = 'a:0:{}', false))";