Gets and parses additional plugin data to send with the heartbeat data
public static get_parsed_plugin_data ( ) : array | ||
return | array | Array of plugin data |
/** * Get additional stat data to sync to WPCOM */ function get_additional_stat_data($prefix = '') { $return["{$prefix}themes"] = Jetpack::get_parsed_theme_data(); $return["{$prefix}plugins-extra"] = Jetpack::get_parsed_plugin_data(); $return["{$prefix}users"] = count_users(); $return["{$prefix}site-count"] = 0; if (function_exists('get_blog_count')) { $return["{$prefix}site-count"] = get_blog_count(); } return $return; }
/** * Get additional stat data to sync to WPCOM */ public static function get_additional_stat_data($prefix = '') { global $wpdb; $return["{$prefix}themes"] = Jetpack::get_parsed_theme_data(); $return["{$prefix}plugins-extra"] = Jetpack::get_parsed_plugin_data(); $return["{$prefix}users"] = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->usermeta} WHERE meta_key = '{$wpdb->prefix}capabilities'"); $return["{$prefix}site-count"] = 0; if (function_exists('get_blog_count')) { $return["{$prefix}site-count"] = get_blog_count(); } return $return; }