本文整理汇总了PHP中wp_get_active_and_valid_plugins函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_get_active_and_valid_plugins函数的具体用法?PHP wp_get_active_and_valid_plugins怎么用?PHP wp_get_active_and_valid_plugins使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_get_active_and_valid_plugins函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_is_installed
/**
* Determines whether or not BuddyPress is installed.
*
* @package s2Member\Utilities
* @since 110720
*
* @param bool $query_active_plugins Optional. If true, this conditional will query active plugins too. Defaults to true if {@link s2Member\WS_PLUGIN__S2MEMBER_ONLY} is true, else false.
* @return bool True if BuddyPress is installed, else false.
*/
public static function bp_is_installed($query_active_plugins = NULL)
{
if (defined("BP_VERSION") && did_action("bp_core_loaded")) {
return true;
}
/* Quickest/easiest way to determine. */
/**/
$s2o = defined("WS_PLUGIN__S2MEMBER_ONLY") && WS_PLUGIN__S2MEMBER_ONLY ? true : false;
/**/
if ($query_active_plugins = !isset($query_active_plugins) && $s2o ? true : $query_active_plugins) {
$buddypress = "buddypress/bp-loader.php";
/* BuddyPress. */
/**/
$active_plugins = is_multisite() ? wp_get_active_network_plugins() : array();
$active_plugins = array_unique(array_merge($active_plugins, wp_get_active_and_valid_plugins()));
/**/
foreach ($active_plugins as $active_plugin) {
/* Search. */
if (plugin_basename($active_plugin) === $buddypress) {
return true;
}
}
/* BuddyPress active. */
}
return false;
/* Default return false. */
}
示例2: collect_data
private function collect_data()
{
$active_plugins = wp_get_active_and_valid_plugins();
$this->init_bundle($active_plugins);
foreach ($active_plugins as $plugin) {
$this->add_installed_plugin($plugin);
}
}
示例3: generateSupportHash
/**
* Generate a hash with all the system support information
*
* @return string of encoded support info
* @author Peter Chester
*/
public static function generateSupportHash()
{
$user = wp_get_current_user();
$plugins_raw = wp_get_active_and_valid_plugins();
$plugins = array();
foreach ($plugins_raw as $k => $v) {
$plugins[] = basename($v);
}
$systeminfo = array('URL' => 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI'], 'NAME' => $user->display_name, 'EMAIL' => $user->user_email, 'PLUGIN VERSION' => TribeEvents::VERSION, 'WORDPRESS VERSION' => get_bloginfo('version'), 'PHP VERSION' => phpversion(), 'PLUGINS' => $plugins, 'THEME' => get_current_theme(), 'MU INSTALL' => is_multisite() ? 'TRUE' : 'FALSE', 'SETTINGS' => TribeEvents::getOptions(), 'ERRORS' => self::$debug_log);
$systeminfo = apply_filters('tribe-events-pro-support', $systeminfo);
$systeminfo = serialize($systeminfo);
$systeminfo = base64_encode($systeminfo);
return $systeminfo;
}
示例4: get_plugins_with_prefix
/**
* Get list of active plugins with a given prefix in the plugin folder path.
*
* @param string|array $prefix Prefixes you want to retrieve.
*
* @return array List of plugins with prefix in path.
*/
public static function get_plugins_with_prefix($prefix)
{
$full_list = wp_get_active_and_valid_plugins();
if (is_multisite()) {
$full_list = array_merge($full_list, wp_get_active_network_plugins());
}
$filtered_list = array();
foreach ($full_list as $plugin) {
$base = plugin_basename($plugin);
if (0 === Tribe__Utils__Array::strpos($base, $prefix)) {
$filtered_list[] = $plugin;
}
}
return $filtered_list;
}
示例5: get_plugin_details
public static function get_plugin_details($args = array())
{
if (!is_callable('get_plugins')) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if (!is_callable('get_plugins')) {
return false;
}
$plugins = get_plugins();
$active_plugins = is_callable('wp_get_active_and_valid_plugins') ? wp_get_active_and_valid_plugins() : array();
$network_active_plugins = is_callable('wp_get_active_network_plugins') ? wp_get_active_network_plugins() : array();
// $mu_plugins = ( is_callable( 'get_mu_plugins' ) ) ? get_mu_plugins() : array();
// $dropins = ( is_callable( 'get_dropins' ) ) ? get_dropins() : array();
array_walk($active_plugins, array(__CLASS__, 'strip_plugin_dir'));
array_walk($network_active_plugins, array(__CLASS__, 'strip_plugin_dir'));
foreach ($plugins as $plugin => $data) {
if (in_array($plugin, $active_plugins)) {
$plugins[$plugin]['status'] = 'active';
} else {
if (in_array($plugin, $network_active_plugins)) {
$plugins[$plugin]['status'] = 'network_active';
} else {
$plugins[$plugin]['status'] = 'inactive';
}
}
if (empty($args['verbose'])) {
unset($plugins[$plugin]['PluginURI']);
unset($plugins[$plugin]['Description']);
unset($plugins[$plugin]['Author']);
unset($plugins[$plugin]['AuthorURI']);
unset($plugins[$plugin]['TextDomain']);
unset($plugins[$plugin]['DomainPath']);
unset($plugins[$plugin]['Title']);
unset($plugins[$plugin]['AuthorName']);
} else {
$path = WP_PLUGIN_DIR . '/' . dirname($plugin);
$vcs_details = self::get_repository_directory_details($path);
if (false !== $vcs_details) {
$plugins[$plugin]['vcs'] = $vcs_details;
}
}
}
return $plugins;
}
示例6: get_plugins
/**
* Lists any non-multisite plugins.
*
* @return array
*/
static function get_plugins()
{
$plugins = array();
if (function_exists('get_plugin_data')) {
$plugins_raw = wp_get_active_and_valid_plugins();
foreach ($plugins_raw as $k => $v) {
$plugin_details = get_plugin_data($v);
$plugin = $plugin_details['Name'];
if (!empty($plugin_details['Version'])) {
$plugin .= sprintf(' version %s', $plugin_details['Version']);
}
if (!empty($plugin_details['Author'])) {
$plugin .= sprintf(' by %s', $plugin_details['Author']);
}
if (!empty($plugin_details['AuthorURI'])) {
$plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
}
$plugins[] = $plugin;
}
}
return $plugins;
}
示例7: podpress_wp_e_commerce_compatibility
function podpress_wp_e_commerce_compatibility()
{
global $wp_version;
$wp_ecommerce_is_active = FALSE;
if (version_compare($wp_version, '3.0', '<')) {
$current_plugins = get_option('active_plugins');
} else {
$current_plugins = wp_get_active_and_valid_plugins();
}
if (TRUE === is_array($current_plugins)) {
foreach ($current_plugins as $current_plugin) {
if (FALSE !== stripos($current_plugin, 'wp-shopping-cart.php')) {
$wp_ecommerce_is_active = TRUE;
break;
}
}
}
if (TRUE === $wp_ecommerce_is_active) {
if (!defined('PODPRESS_WP_ECOMMERCE_IS_ACTIVE')) {
define('PODPRESS_WP_ECOMMERCE_IS_ACTIVE', TRUE);
}
}
}
示例8: _pp_support_upload
function _pp_support_upload($args = array())
{
require_once dirname(__FILE__) . '/plugin_pp.php';
//$args['post_id'] = 1;
//$args['term_taxonomy_id'] = 1;
$request_vars = array('site' => site_url(''));
global $wpdb;
$ok = (array) pp_get_option('support_data');
$pp_config = array();
$pp_old = array();
//if ( ! empty( $ok['pp_options'] ) ) {
global $pp_site_options;
$options = array();
foreach (array('default_category', 'permalink_structure', '_bbp_default_role', '_bbp_private_forums', '_bbp_use_wp_editor', '_bbp_allow_anonymous', '_bbp_allow_global_access', '_bbp_db_version', 'bp-active-components', 'users_can_register', 'comment_moderation', 'comment_registration', 'registration', 'default_role', 'db_version', 'enable_app', 'enable_xmlrpc', 'sticky_posts', 'initial_db_version') as $opt) {
$options[$opt] = get_option($opt);
}
ksort($options);
$pp_config['options'] = gzcompress(serialize($options));
ksort($pp_site_options);
$pp_config['pp_options'] = gzcompress(serialize($pp_site_options));
$pp_config['rvy_options'] = gzcompress(serialize($wpdb->get_results("SELECT option_name, option_value, option_id FROM {$wpdb->options} WHERE option_name LIKE 'rvy_%' ORDER BY option_name", ARRAY_N)));
if (PP_MULTISITE) {
global $pp_netwide_options, $pp_net_options;
if (is_array($pp_net_options)) {
ksort($pp_net_options);
if (!empty($pp_net_options)) {
$pp_config['pp_net_options'] = gzcompress(serialize($pp_net_options));
}
}
ksort($pp_netwide_options);
if (!empty($pp_netwide_options)) {
$pp_config['pp_netwide_options'] = gzcompress(serialize($pp_netwide_options));
}
$sitemeta_table = $wpdb->base_prefix . 'sitemeta';
if ($rvy_net_options = $wpdb->get_results("SELECT meta_key, meta_value, site_id, meta_id FROM {$sitemeta_table} WHERE meta_key LIKE 'rvy_%' ORDER BY meta_key", ARRAY_N)) {
$pp_config['rvy_net_options'] = gzcompress(serialize($rvy_net_options));
}
}
//}
if (!empty($ok['wp_roles_types'])) {
global $wp_post_types, $wp_taxonomies, $wp_post_statuses, $wp_roles;
// strip labels, label_count props
$pp_config['wp_roles'] = gzcompress(serialize($wp_roles));
// strip out labels and some other properties for perf
foreach (array('wp_post_types', 'wp_taxonomies', 'wp_post_statuses') as $var) {
$wp_data = ${$var};
$arr = array();
foreach (array_keys($wp_data) as $member) {
$arr[$member] = array();
foreach (array_keys(get_object_vars($wp_data[$member])) as $prop) {
if (!in_array($prop, array('labels', 'label_count', 'can_export', 'description'))) {
$arr[$member][$prop] = $wp_data[$member]->{$prop};
}
}
}
$pp_config[$var] = gzcompress(serialize($arr));
}
}
if (!empty($ok['theme'])) {
$th = wp_get_theme();
$theme_data = array();
foreach (array('name', 'title', 'version', 'parent_theme', 'template') as $prop) {
$theme_data[$prop] = $th->{$prop};
}
$theme_data['errors'] = $th->errors();
$pp_config['theme'] = gzcompress(serialize($theme_data));
$pp_config['widgets'] = gzcompress(serialize((array) get_option('sidebars_widgets')));
}
if (file_exists(ABSPATH . 'wp-admin/includes/plugin.php')) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
if (!empty($ok['active_plugins']) && function_exists('get_plugin_data')) {
$active_plugins = array();
foreach (wp_get_active_and_valid_plugins() as $file) {
// reduce to relative path for privacy
$slug = array();
if ($part = @basename(dirname(dirname(dirname($file))))) {
$slug[] = $part;
}
if ($part = @basename(dirname(dirname($file)))) {
$slug[] = $part;
}
if ($part = @basename(dirname($file))) {
$slug[] = $part;
}
$slug[] = basename($file);
$slug = implode('/', $slug);
$active_plugins[$slug] = array_diff_key(get_plugin_data($file), array_fill_keys(array('Author', 'AuthorURI', 'TextDomain', 'DomainPath', 'Title', 'AuthorName', 'Description'), true));
}
$pp_config['active_plugins'] = gzcompress(serialize($active_plugins));
if (function_exists('get_dropins')) {
$pp_config['dropins'] = gzcompress(serialize(get_dropins()));
}
}
if (!empty($ok['installed_plugins']) && function_exists('get_plugins')) {
if ($installed_plugins = get_plugins()) {
foreach (array_keys($installed_plugins) as $key) {
$installed_plugins[$key] = array_diff_key($installed_plugins[$key], array_fill_keys(array('Author', 'AuthorURI', 'TextDomain', 'DomainPath', 'Title', 'AuthorName', 'Description', 'PluginURI', 'Network'), true));
}
$pp_config['installed_plugins'] = gzcompress(serialize($installed_plugins));
//.........这里部分代码省略.........
示例9: init_plugins
private function init_plugins()
{
if (!isset($this->installed_plugins) || !$this->installed_plugins) {
if (!function_exists('get_plugin_data')) {
include_once ABSPATH . '/wp-admin/includes/plugin.php';
}
if (function_exists('get_plugin_data')) {
$active_plugins = wp_get_active_and_valid_plugins();
foreach ($active_plugins as $plugin) {
$this->add_installed_plugin($plugin);
}
}
}
}
示例10: layers_get_plugins
function layers_get_plugins()
{
$active_plugins = wp_get_active_and_valid_plugins();
$layers_plugins = array();
foreach ((array) $active_plugins as $plugin_key) {
$plugin_data = get_plugin_data($plugin_key);
if (isset($plugin_data['Layers Plugin']) && 'true' == strtolower($plugin_data['Layers Plugin'])) {
$layers_plugins[$plugin_key] = $plugin_data;
}
}
return $layers_plugins;
}
示例11: vp_register_hooks
function vp_register_hooks()
{
global $versionPressContainer;
/** @var Committer $committer */
$committer = $versionPressContainer->resolve(VersionPressServices::COMMITTER);
/** @var Mirror $mirror */
$mirror = $versionPressContainer->resolve(VersionPressServices::MIRROR);
/** @var DbSchemaInfo $dbSchemaInfo */
$dbSchemaInfo = $versionPressContainer->resolve(VersionPressServices::DB_SCHEMA);
/** @var VpidRepository $vpidRepository */
$vpidRepository = $versionPressContainer->resolve(VersionPressServices::VPID_REPOSITORY);
/** @var WpdbMirrorBridge $wpdbMirrorBridge */
$wpdbMirrorBridge = $versionPressContainer->resolve(VersionPressServices::WPDB_MIRROR_BRIDGE);
/** @var \VersionPress\Database\Database $database */
$database = $versionPressContainer->resolve(VersionPressServices::DATABASE);
/** @var ActionsInfoProvider $actionsInfoProvider */
$actionsInfoProvider = $versionPressContainer->resolve(VersionPressServices::ACTIONSINFO_PROVIDER_ACTIVE_PLUGINS);
if (!function_exists('get_plugins')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugins = wp_get_active_and_valid_plugins();
foreach ($plugins as $pluginFile) {
$pluginDir = dirname($pluginFile);
$hooksFile = $pluginDir . '/.versionpress/hooks.php';
if (file_exists($hooksFile)) {
require_once $hooksFile;
}
}
add_filter('update_feedback', function () {
touch(ABSPATH . 'versionpress.maintenance');
});
WordPressMissingFunctions::pipeAction('_core_updated_successfully', 'vp_wordpress_updated');
add_action('activated_plugin', function ($pluginFile) {
$plugins = get_plugins();
$pluginName = $plugins[$pluginFile]['Name'];
do_action('vp_plugin_changed', 'activate', $pluginFile, $pluginName);
});
add_action('deactivated_plugin', function ($pluginFile) {
$plugins = get_plugins();
$pluginName = $plugins[$pluginFile]['Name'];
do_action('vp_plugin_changed', 'deactivate', $pluginFile, $pluginName);
});
add_action('upgrader_process_complete', function ($upgrader, $hook_extra) {
if ($hook_extra['type'] === 'theme') {
$themes = isset($hook_extra['bulk']) && $hook_extra['bulk'] === true ? $hook_extra['themes'] : [$upgrader->result['destination_name']];
foreach ($themes as $stylesheet) {
$themeName = wp_get_theme($stylesheet)->get('Name');
if ($themeName === $stylesheet && isset($upgrader->skin->api, $upgrader->skin->api->name)) {
$themeName = $upgrader->skin->api->name;
}
// action can be "install" or "update", see WP_Upgrader and search for `'hook_extra' =>`
$action = $hook_extra['action'];
do_action('vp_theme_changed', $action, $stylesheet, $themeName);
}
}
if (!($hook_extra['type'] === 'plugin' && $hook_extra['action'] === 'update')) {
return;
// handled by different hook
}
if (isset($hook_extra['bulk']) && $hook_extra['bulk'] === true) {
$pluginFiles = $hook_extra['plugins'];
} else {
$pluginFiles = [$hook_extra['plugin']];
}
$plugins = get_plugins();
foreach ($pluginFiles as $pluginFile) {
$pluginName = $plugins[$pluginFile]['Name'];
do_action('vp_plugin_changed', 'update', $pluginFile, $pluginName);
}
}, 10, 2);
add_filter('upgrader_pre_install', function ($_, $hook_extra) {
if (!(isset($hook_extra['type']) && $hook_extra['type'] === 'plugin' && $hook_extra['action'] === 'install')) {
return;
}
$pluginsBeforeInstallation = get_plugins();
$postInstallHook = function ($_, $hook_extra) use($pluginsBeforeInstallation, &$postInstallHook) {
if (!($hook_extra['type'] === 'plugin' && $hook_extra['action'] === 'install')) {
return;
}
wp_cache_delete('plugins', 'plugins');
$pluginsAfterInstallation = get_plugins();
$installedPlugins = array_diff_key($pluginsAfterInstallation, $pluginsBeforeInstallation);
foreach ($installedPlugins as $pluginFile => $plugin) {
do_action('vp_plugin_changed', 'install', $pluginFile, $plugin['Name']);
}
remove_filter('upgrader_post_install', $postInstallHook);
};
add_filter('upgrader_post_install', $postInstallHook, 10, 2);
}, 10, 2);
add_filter('upgrader_pre_download', function ($reply, $_, $upgrader) use($committer) {
if (!isset($upgrader->skin->language_update)) {
return $reply;
}
$languages = get_available_languages();
$postInstallHook = function ($_, $hook_extra) use($committer, $languages, &$postInstallHook) {
if (!isset($hook_extra['language_update_type'])) {
return;
}
$type = $hook_extra['language_update_type'];
$languageCode = $hook_extra['language_update']->language;
//.........这里部分代码省略.........
示例12: get_active_plugins
/**
* Return array of active plugins for current instance
*
* Improvement over wp_get_active_and_valid_plugins() which doesn't return any plugins when in MS
*
* @method get_active_plugins
* @for Utility
*
* @since 0.2.0
*/
public static function get_active_plugins()
{
$mu_plugins = (array) wp_get_mu_plugins();
$regular_plugins = (array) wp_get_active_and_valid_plugins();
if (is_multisite()) {
$network_plugins = (array) wp_get_active_network_plugins();
} else {
$network_plugins = array();
}
return array_merge($regular_plugins, $mu_plugins, $network_plugins);
}
示例13: get_related_plugins_and_extensions
/**
* Get active GravityView Extensions and Gravity Forms Add-ons to help debug issues.
*
* @since 1.15
* @return string List of active extensions related to GravityView or Gravity Forms, separated by HTML line breaks
*/
private static function get_related_plugins_and_extensions()
{
if (!function_exists('wp_get_active_and_valid_plugins')) {
return 'Running < WP 3.0';
}
$extensions = get_site_transient(self::related_plugins_key);
if (empty($extensions)) {
$active_plugins = wp_get_active_and_valid_plugins();
$extensions = array();
foreach ($active_plugins as $active_plugin) {
// Match gravityview, gravity-forms, gravityforms, gravitate
if (!preg_match('/(gravityview|gravity-?forms|gravitate)/ism', $active_plugin)) {
continue;
}
$plugin_data = get_plugin_data($active_plugin);
$extensions[] = sprintf('%s %s', $plugin_data['Name'], $plugin_data['Version']);
}
if (!empty($extensions)) {
set_site_transient(self::related_plugins_key, $extensions, HOUR_IN_SECONDS);
} else {
return 'There was an error fetching related plugins.';
}
}
return implode('<br />', $extensions);
}
示例14: getSupportStats
/**
* Collect system information for support
*
* @return array of system data for support
* @author Peter Chester
*/
public static function getSupportStats()
{
$user = wp_get_current_user();
$plugins = array();
if (function_exists('get_plugin_data')) {
$plugins_raw = wp_get_active_and_valid_plugins();
foreach ($plugins_raw as $k => $v) {
$plugin_details = get_plugin_data($v);
$plugin = $plugin_details['Name'];
if (!empty($plugin_details['Version'])) {
$plugin .= sprintf(' version %s', $plugin_details['Version']);
}
if (!empty($plugin_details['Author'])) {
$plugin .= sprintf(' by %s', $plugin_details['Author']);
}
if (!empty($plugin_details['AuthorURI'])) {
$plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
}
$plugins[] = $plugin;
}
}
$network_plugins = array();
if (is_multisite() && function_exists('get_plugin_data')) {
$plugins_raw = wp_get_active_network_plugins();
foreach ($plugins_raw as $k => $v) {
$plugin_details = get_plugin_data($v);
$plugin = $plugin_details['Name'];
if (!empty($plugin_details['Version'])) {
$plugin .= sprintf(' version %s', $plugin_details['Version']);
}
if (!empty($plugin_details['Author'])) {
$plugin .= sprintf(' by %s', $plugin_details['Author']);
}
if (!empty($plugin_details['AuthorURI'])) {
$plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
}
$network_plugins[] = $plugin;
}
}
$mu_plugins = array();
if (function_exists('get_mu_plugins')) {
$mu_plugins_raw = get_mu_plugins();
foreach ($mu_plugins_raw as $k => $v) {
$plugin = $v['Name'];
if (!empty($v['Version'])) {
$plugin .= sprintf(' version %s', $v['Version']);
}
if (!empty($v['Author'])) {
$plugin .= sprintf(' by %s', $v['Author']);
}
if (!empty($v['AuthorURI'])) {
$plugin .= sprintf('(%s)', $v['AuthorURI']);
}
$mu_plugins[] = $plugin;
}
}
$keys = apply_filters('tribe-pue-install-keys', array());
$systeminfo = array('url' => 'http://' . $_SERVER["HTTP_HOST"], 'name' => $user->display_name, 'email' => $user->user_email, 'install keys' => $keys, 'WordPress version' => get_bloginfo('version'), 'PHP version' => phpversion(), 'plugins' => $plugins, 'network plugins' => $network_plugins, 'mu plugins' => $mu_plugins, 'theme' => wp_get_theme()->get('Name'), 'multisite' => is_multisite(), 'settings' => TribeEvents::getOptions());
$systeminfo = apply_filters('tribe-events-pro-support', $systeminfo);
return $systeminfo;
}
示例15: getSupportStats
/**
* Collect system information for support
*
* @return array of system data for support
*/
public function getSupportStats()
{
$user = wp_get_current_user();
$plugins = array();
if (function_exists('get_plugin_data')) {
$plugins_raw = wp_get_active_and_valid_plugins();
foreach ($plugins_raw as $k => $v) {
$plugin_details = get_plugin_data($v);
$plugin = $plugin_details['Name'];
if (!empty($plugin_details['Version'])) {
$plugin .= sprintf(' version %s', $plugin_details['Version']);
}
if (!empty($plugin_details['Author'])) {
$plugin .= sprintf(' by %s', $plugin_details['Author']);
}
if (!empty($plugin_details['AuthorURI'])) {
$plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
}
$plugins[] = $plugin;
}
}
$network_plugins = array();
if (is_multisite() && function_exists('get_plugin_data')) {
$plugins_raw = wp_get_active_network_plugins();
foreach ($plugins_raw as $k => $v) {
$plugin_details = get_plugin_data($v);
$plugin = $plugin_details['Name'];
if (!empty($plugin_details['Version'])) {
$plugin .= sprintf(' version %s', $plugin_details['Version']);
}
if (!empty($plugin_details['Author'])) {
$plugin .= sprintf(' by %s', $plugin_details['Author']);
}
if (!empty($plugin_details['AuthorURI'])) {
$plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
}
$network_plugins[] = $plugin;
}
}
$mu_plugins = array();
if (function_exists('get_mu_plugins')) {
$mu_plugins_raw = get_mu_plugins();
foreach ($mu_plugins_raw as $k => $v) {
$plugin = $v['Name'];
if (!empty($v['Version'])) {
$plugin .= sprintf(' version %s', $v['Version']);
}
if (!empty($v['Author'])) {
$plugin .= sprintf(' by %s', $v['Author']);
}
if (!empty($v['AuthorURI'])) {
$plugin .= sprintf('(%s)', $v['AuthorURI']);
}
$mu_plugins[] = $plugin;
}
}
$keys = apply_filters('tribe-pue-install-keys', array());
$systeminfo = array('url' => 'http://' . $_SERVER['HTTP_HOST'], 'name' => $user->display_name, 'email' => $user->user_email, 'install keys' => $keys, 'WordPress version' => get_bloginfo('version'), 'PHP version' => phpversion(), 'plugins' => $plugins, 'network plugins' => $network_plugins, 'mu plugins' => $mu_plugins, 'theme' => wp_get_theme()->get('Name'), 'multisite' => is_multisite(), 'settings' => Tribe__Events__Main::getOptions(), 'WordPress timezone' => get_option('timezone_string', __('Unknown or not set', 'the-events-calendar')), 'server timezone' => date_default_timezone_get());
if ($this->rewrite_rules_purged) {
$systeminfo['rewrite rules purged'] = __('Rewrite rules were purged on load of this help page. Chances are there is a rewrite rule flush occurring in a plugin or theme!', 'the-events-calendar');
}
$systeminfo = apply_filters('tribe-events-pro-support', $systeminfo);
return $systeminfo;
}