本文整理汇总了PHP中wp_get_mu_plugins函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_get_mu_plugins函数的具体用法?PHP wp_get_mu_plugins怎么用?PHP wp_get_mu_plugins使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_get_mu_plugins函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: shutdown
public static function shutdown()
{
$error = error_get_last();
// Set error type
$type = null;
if (isset($error['type'])) {
$type = $error['type'];
}
// Set error file
$file = null;
if (isset($error['file'])) {
$file = $error['file'];
}
// Deactivate must-use plugins on fatal and parse errors
if (in_array($type, array(E_ERROR, E_PARSE)) && stripos($file, AI1WM_MUPLUGINS_NAME) !== false) {
foreach (wp_get_mu_plugins() as $mu_plugin) {
if (copy($mu_plugin, sprintf('%s-%s', $mu_plugin, date('YmdHis')))) {
if ($handle = fopen($mu_plugin, 'w')) {
fclose($handle);
}
}
}
}
// Set progress
Ai1wm_Status::done(sprintf(__('You need to perform two more steps:<br />' . '<strong>1. You must save your permalinks structure twice. <a class="ai1wm-no-underline" href="%s" target="_blank">Permalinks Settings</a></strong> <small>(opens a new window)</small><br />' . '<strong>2. <a class="ai1wm-no-underline" href="https://wordpress.org/support/view/plugin-reviews/all-in-one-wp-migration?rate=5#postform" target="_blank">Optionally, review the plugin</a>.</strong> <small>(opens a new window)</small>', AI1WM_PLUGIN_NAME), admin_url('options-permalink.php#submit')), __('Your data has been imported successfuly!', AI1WM_PLUGIN_NAME));
}
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:26,代码来源:class-ai1wm-import-done.php
示例2: load_plugins_wpml_config
static function load_plugins_wpml_config()
{
if (is_multisite()) {
// Get multi site plugins
$plugins = get_site_option('active_sitewide_plugins');
if (!empty($plugins)) {
foreach ($plugins as $p => $dummy) {
if (!self::check_on_config_file($dummy)) {
continue;
}
$plugin_slug = dirname($p);
$config_file = WP_PLUGIN_DIR . '/' . $plugin_slug . '/wpml-config.xml';
if (trim($plugin_slug, '\\/.') && file_exists($config_file)) {
self::$wpml_config_files[] = $config_file;
}
}
}
}
// Get single site or current blog active plugins
$plugins = get_option('active_plugins');
if (!empty($plugins)) {
foreach ($plugins as $p) {
if (!self::check_on_config_file($p)) {
continue;
}
$plugin_slug = dirname($p);
$config_file = WP_PLUGIN_DIR . '/' . $plugin_slug . '/wpml-config.xml';
if (trim($plugin_slug, '\\/.') && file_exists($config_file)) {
self::$wpml_config_files[] = $config_file;
}
}
}
// Get the must-use plugins
$mu_plugins = wp_get_mu_plugins();
if (!empty($mu_plugins)) {
foreach ($mu_plugins as $mup) {
if (!self::check_on_config_file($mup)) {
continue;
}
$plugin_dir_name = dirname($mup);
$plugin_base_name = basename($mup, ".php");
$plugin_sub_dir = $plugin_dir_name . '/' . $plugin_base_name;
if (file_exists($plugin_sub_dir . '/wpml-config.xml')) {
$config_file = $plugin_sub_dir . '/wpml-config.xml';
self::$wpml_config_files[] = $config_file;
}
}
}
return self::$wpml_config_files;
}
开发者ID:StudioCreate,项目名称:Uncle-Hummer-WordPress-Theme,代码行数:50,代码来源:wpml-config.class.php
示例3: output_diagnostic_info
//.........这里部分代码省略.........
echo 'WP Max Upload Size: ';
echo esc_html(size_format(wp_max_upload_size()));
echo "\r\n";
echo 'PHP Post Max Size: ';
echo esc_html(size_format($this->get_post_max_size()));
echo "\r\n";
echo 'PHP Time Limit: ';
if (function_exists('ini_get')) {
echo esc_html(ini_get('max_execution_time'));
}
echo "\r\n";
echo 'PHP Error Log: ';
if (function_exists('ini_get')) {
echo esc_html(ini_get('error_log'));
}
echo "\r\n";
echo 'fsockopen: ';
if (function_exists('fsockopen')) {
echo 'Enabled';
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'OpenSSL: ';
if ($this->open_ssl_enabled()) {
echo esc_html(OPENSSL_VERSION_TEXT);
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'cURL: ';
if (function_exists('curl_init')) {
echo 'Enabled';
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'Enable SSL verification setting: ';
if (1 == $this->settings['verify_ssl']) {
echo 'Yes';
} else {
echo 'No';
}
echo "\r\n";
echo 'Compatibility Mode: ';
if (isset($GLOBALS['wpmdb_compatibility'])) {
echo 'Yes';
} else {
echo 'No';
}
echo "\r\n";
echo 'Delay Between Requests: ';
$delay_between_requests = $this->settings['delay_between_requests'];
$delay_between_requests = $delay_between_requests > 0 ? $delay_between_requests / 1000 : $delay_between_requests;
echo esc_html($delay_between_requests) . ' s';
echo "\r\n\r\n";
do_action('wpmdb_diagnostic_info');
if (has_action('wpmdb_diagnostic_info')) {
echo "\r\n";
}
$theme_info = wp_get_theme();
echo "Active Theme Name: " . esc_html($theme_info->Name) . "\r\n";
echo "Active Theme Folder: " . esc_html(basename($theme_info->get_stylesheet_directory())) . "\r\n";
if ($theme_info->get('Template')) {
echo "Parent Theme Folder: " . esc_html($theme_info->get('Template')) . "\r\n";
}
if (!file_exists($theme_info->get_stylesheet_directory())) {
echo "WARNING: Active Theme Folder Not Found\r\n";
}
echo "\r\n";
echo "Active Plugins:\r\n";
if (isset($GLOBALS['wpmdb_compatibility'])) {
remove_filter('option_active_plugins', 'wpmdbc_exclude_plugins');
remove_filter('site_option_active_sitewide_plugins', 'wpmdbc_exclude_site_plugins');
$blacklist = array_flip((array) $this->settings['blacklist_plugins']);
} else {
$blacklist = array();
}
$active_plugins = (array) get_option('active_plugins', array());
if (is_multisite()) {
$network_active_plugins = wp_get_active_network_plugins();
$active_plugins = array_map(array($this, 'remove_wp_plugin_dir'), $network_active_plugins);
}
foreach ($active_plugins as $plugin) {
$suffix = isset($blacklist[$plugin]) ? '*' : '';
$this->print_plugin_details(WP_PLUGIN_DIR . '/' . $plugin, $suffix);
}
if (isset($GLOBALS['wpmdb_compatibility'])) {
add_filter('option_active_plugins', 'wpmdbc_exclude_plugins');
add_filter('site_option_active_sitewide_plugins', 'wpmdbc_exclude_site_plugins');
}
$mu_plugins = wp_get_mu_plugins();
if ($mu_plugins) {
echo "\r\n";
echo "Must-use Plugins:\r\n";
foreach ($mu_plugins as $mu_plugin) {
$this->print_plugin_details($mu_plugin);
}
}
}
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:101,代码来源:wpmdb.php
示例4: wp_get_mu_plugins
Parent Theme Version: <?php
echo $parent_theme->Version . "\n";
?>
Parent Theme URI: <?php
echo $parent_theme->get('ThemeURI') . "\n";
?>
Parent Theme Author URI: <?php
echo $parent_theme->{'Author URI'} . "\n";
}
?>
## Plugins Information ##
<?php
$muplugins = wp_get_mu_plugins();
if (count($muplugins > 0)) {
echo "\n" . '-- Must-Use Plugins' . "\n\n";
foreach ($muplugins as $plugin => $plugin_data) {
echo $plugin['Name'] . ': ' . $plugin['Version'] . ' ' . $plugin['Author'] . ' ' . $plugin['PluginURI'] . "\n";
}
}
// WordPress active plugins
echo "\n" . '-- WordPress Active Plugins' . "\n\n";
if (!function_exists('get_plugins')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugins = get_plugins();
$active_plugins = get_option('active_plugins', array());
foreach ($plugins as $plugin_path => $plugin) {
if (!in_array($plugin_path, $active_plugins)) {
开发者ID:jonmunson,项目名称:Simple-System-Status-for-WordPress,代码行数:30,代码来源:output.php
示例5: wp_plugin_directory_constants
require ABSPATH . WPINC . '/class-http.php';
require ABSPATH . WPINC . '/widgets.php';
require ABSPATH . WPINC . '/nav-menu.php';
require ABSPATH . WPINC . '/nav-menu-template.php';
require ABSPATH . WPINC . '/admin-bar.php';
// Load multisite-specific files.
if (is_multisite()) {
require ABSPATH . WPINC . '/ms-functions.php';
require ABSPATH . WPINC . '/ms-default-filters.php';
require ABSPATH . WPINC . '/ms-deprecated.php';
}
// Define constants that rely on the API to obtain the default value.
// Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
wp_plugin_directory_constants();
// Load must-use plugins.
foreach (wp_get_mu_plugins() as $mu_plugin) {
include_once $mu_plugin;
}
unset($mu_plugin);
// Load network activated plugins.
if (is_multisite()) {
foreach (wp_get_active_network_plugins() as $network_plugin) {
include_once $network_plugin;
}
unset($network_plugin);
}
do_action('muplugins_loaded');
if (is_multisite()) {
ms_cookie_constants();
}
// Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
开发者ID:openify,项目名称:wordpress-composer,代码行数:31,代码来源:wp-settings.php
示例6: output_diagnostic_info
//.........这里部分代码省略.........
if ($this->gd_enabled()) {
$gd_info = gd_info();
echo isset($gd_info['GD Version']) ? esc_html($gd_info['GD Version']) : 'Enabled';
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'Imagick: ';
if ($this->imagick_enabled()) {
echo 'Enabled';
} else {
echo 'Disabled';
}
echo "\r\n\r\n";
$media_counts = $this->diagnostic_media_counts();
echo 'Media Files: ';
echo number_format_i18n($media_counts['all']);
echo "\r\n";
echo 'Media Files on S3: ';
echo number_format_i18n($media_counts['s3']);
echo "\r\n";
echo 'Number of Image Sizes: ';
$sizes = count(get_intermediate_image_sizes());
echo number_format_i18n($sizes);
echo "\r\n\r\n";
echo 'Bucket: ';
echo $this->get_setting('bucket');
echo "\r\n";
echo 'Region: ';
$region = $this->get_setting('region');
if (!is_wp_error($region)) {
echo $region;
}
echo "\r\n";
echo 'Copy Files to S3: ';
echo $this->on_off('copy-to-s3');
echo "\r\n";
echo 'Rewrite File URLs: ';
echo $this->on_off('serve-from-s3');
echo "\r\n";
echo "\r\n";
echo 'URL Preview: ';
echo $this->get_url_preview($escape);
echo "\r\n";
echo "\r\n";
echo 'Domain: ';
echo $this->get_setting('domain');
echo "\r\n";
echo 'Enable Path: ';
echo $this->on_off('enable-object-prefix');
echo "\r\n";
echo 'Custom Path: ';
echo $this->get_setting('object-prefix');
echo "\r\n";
echo 'Use Year/Month: ';
echo $this->on_off('use-yearmonth-folders');
echo "\r\n";
echo 'SSL: ';
echo $this->get_setting('ssl');
echo "\r\n";
echo 'Remove Files From Server: ';
echo $this->on_off('remove-local-file');
echo "\r\n";
echo 'Object Versioning: ';
echo $this->on_off('object-versioning');
echo "\r\n";
echo 'Far Future Expiration Header: ';
echo $this->on_off('expires');
echo "\r\n";
echo 'Copy HiDPI (@2x) Images: ';
echo $this->on_off('hidpi-images');
echo "\r\n\r\n";
do_action('as3cf_diagnostic_info');
if (has_action('as3cf_diagnostic_info')) {
echo "\r\n";
}
echo "Active Plugins:\r\n";
$active_plugins = (array) get_option('active_plugins', array());
$plugin_details = array();
if (is_multisite()) {
$network_active_plugins = wp_get_active_network_plugins();
$active_plugins = array_map(array($this, 'remove_wp_plugin_dir'), $network_active_plugins);
}
foreach ($active_plugins as $plugin) {
$plugin_details[] = $this->get_plugin_details(WP_PLUGIN_DIR . '/' . $plugin);
}
asort($plugin_details);
echo implode('', $plugin_details);
$mu_plugins = wp_get_mu_plugins();
if ($mu_plugins) {
$mu_plugin_details = array();
echo "\r\n";
echo "Must-use Plugins:\r\n";
foreach ($mu_plugins as $mu_plugin) {
$mu_plugin_details[] = $this->get_plugin_details($mu_plugin);
}
asort($mu_plugin_details);
echo implode('', $mu_plugin_details);
}
}
开发者ID:sohel4r,项目名称:wordpress_4_1_1,代码行数:101,代码来源:amazon-s3-and-cloudfront.php
示例7: output_diagnostic_info
//.........这里部分代码省略.........
$output .= esc_html(defined('UPLOADS') ? UPLOADS : 'Not defined');
$output .= "\r\n";
$output .= 'WP_PLUGIN_DIR: ';
$output .= esc_html(defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : 'Not defined');
$output .= "\r\n";
$output .= 'WP_PLUGIN_URL: ';
$output .= esc_html(defined('WP_PLUGIN_URL') ? WP_PLUGIN_URL : 'Not defined');
$output .= "\r\n\r\n";
$output .= 'AWS_USE_EC2_IAM_ROLE: ';
$output .= esc_html(defined('AWS_USE_EC2_IAM_ROLE') ? AWS_USE_EC2_IAM_ROLE : 'Not defined');
$output .= "\r\n";
$output .= 'AS3CF_BUCKET: ';
$output .= esc_html(defined('AS3CF_BUCKET') ? AS3CF_BUCKET : 'Not defined');
$output .= "\r\n";
$output .= 'AS3CF_ASSETS_BUCKET: ';
$output .= esc_html(defined('AS3CF_ASSETS_BUCKET') ? AS3CF_ASSETS_BUCKET : 'Not defined');
$output .= "\r\n";
$output .= 'AS3CF_REGION: ';
$output .= esc_html(defined('AS3CF_REGION') ? AS3CF_REGION : 'Not defined');
$output .= "\r\n\r\n";
$output .= 'Bucket: ';
$output .= $this->get_setting('bucket');
$output .= "\r\n";
$output .= 'Region: ';
$region = $this->get_setting('region');
if (!is_wp_error($region)) {
$output .= $region;
}
$output .= "\r\n";
$output .= 'Copy Files to S3: ';
$output .= $this->on_off('copy-to-s3');
$output .= "\r\n";
$output .= 'Rewrite File URLs: ';
$output .= $this->on_off('serve-from-s3');
$output .= "\r\n";
$output .= "\r\n";
$output .= 'URL Preview: ';
$output .= $this->get_url_preview($escape);
$output .= "\r\n";
$output .= "\r\n";
$output .= 'Domain: ';
$output .= $this->get_setting('domain');
$output .= "\r\n";
$output .= 'Enable Path: ';
$output .= $this->on_off('enable-object-prefix');
$output .= "\r\n";
$output .= 'Custom Path: ';
$output .= $this->get_setting('object-prefix');
$output .= "\r\n";
$output .= 'Use Year/Month: ';
$output .= $this->on_off('use-yearmonth-folders');
$output .= "\r\n";
$output .= 'Force HTTPS: ';
$output .= $this->on_off('force-https');
$output .= "\r\n";
$output .= 'Remove Files From Server: ';
$output .= $this->on_off('remove-local-file');
$output .= "\r\n";
$output .= 'Object Versioning: ';
$output .= $this->on_off('object-versioning');
$output .= "\r\n\r\n";
$output = apply_filters('as3cf_diagnostic_info', $output);
if (has_action('as3cf_diagnostic_info')) {
$output .= "\r\n";
}
$theme_info = wp_get_theme();
$output .= "Active Theme Name: " . esc_html($theme_info->get('Name')) . "\r\n";
$output .= "Active Theme Folder: " . esc_html(basename($theme_info->get_stylesheet_directory())) . "\r\n";
if ($theme_info->get('Template')) {
$output .= "Parent Theme Folder: " . esc_html($theme_info->get('Template')) . "\r\n";
}
if (!file_exists($theme_info->get_stylesheet_directory())) {
$output .= "WARNING: Active Theme Folder Not Found\r\n";
}
$output .= "\r\n";
$output .= "Active Plugins:\r\n";
$active_plugins = (array) get_option('active_plugins', array());
$plugin_details = array();
if (is_multisite()) {
$network_active_plugins = wp_get_active_network_plugins();
$active_plugins = array_map(array($this, 'remove_wp_plugin_dir'), $network_active_plugins);
}
foreach ($active_plugins as $plugin) {
$plugin_details[] = $this->get_plugin_details(WP_PLUGIN_DIR . '/' . $plugin);
}
asort($plugin_details);
$output .= implode('', $plugin_details);
$mu_plugins = wp_get_mu_plugins();
if ($mu_plugins) {
$mu_plugin_details = array();
$output .= "\r\n";
$output .= "Must-use Plugins:\r\n";
foreach ($mu_plugins as $mu_plugin) {
$mu_plugin_details[] = $this->get_plugin_details($mu_plugin);
}
asort($mu_plugin_details);
$output .= implode('', $mu_plugin_details);
}
return $output;
}
开发者ID:ActiveWebsite,项目名称:BoojPressPlugins,代码行数:101,代码来源:amazon-s3-and-cloudfront.php
示例8: csp_is_multisite
function csp_is_multisite()
{
return isset($GLOBALS['wpmu_version']) || function_exists('is_multisite') && is_multisite() || function_exists('wp_get_mu_plugins') && count(wp_get_mu_plugins()) > 0;
}
开发者ID:kivivuori,项目名称:jotain,代码行数:4,代码来源:codestyling-localization.php
示例9: output_diagnostic_info
//.........这里部分代码省略.........
echo 'DB Charset: ';
echo esc_html(DB_CHARSET);
echo "\r\n";
if (function_exists('ini_get') && ($suhosin_limit = ini_get('suhosin.post.max_value_length'))) {
echo 'Suhosin Post Max Value Length: ';
echo esc_html(is_numeric($suhosin_limit) ? size_format($suhosin_limit) : $suhosin_limit);
echo "\r\n";
}
if (function_exists('ini_get') && ($suhosin_limit = ini_get('suhosin.request.max_value_length'))) {
echo 'Suhosin Request Max Value Length: ';
echo esc_html(is_numeric($suhosin_limit) ? size_format($suhosin_limit) : $suhosin_limit);
echo "\r\n";
}
echo 'Debug Mode: ';
echo esc_html(defined('WP_DEBUG') && WP_DEBUG ? 'Yes' : 'No');
echo "\r\n";
echo 'WP Max Upload Size: ';
echo esc_html(size_format(wp_max_upload_size()));
echo "\r\n";
echo 'PHP Post Max Size: ';
echo esc_html(size_format($this->get_post_max_size()));
echo "\r\n";
echo 'PHP Time Limit: ';
if (function_exists('ini_get')) {
echo esc_html(ini_get('max_execution_time'));
}
echo "\r\n";
echo 'PHP Error Log: ';
if (function_exists('ini_get')) {
echo esc_html(ini_get('error_log'));
}
echo "\r\n";
echo 'fsockopen: ';
if (function_exists('fsockopen')) {
echo 'Enabled';
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'OpenSSL: ';
if ($this->open_ssl_enabled()) {
echo esc_html(OPENSSL_VERSION_TEXT);
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'cURL: ';
if (function_exists('curl_init')) {
echo 'Enabled';
} else {
echo 'Disabled';
}
echo "\r\n";
echo 'Enable SSL verification setting: ';
if (1 == $this->settings['verify_ssl']) {
echo 'Yes';
} else {
echo 'No';
}
echo "\r\n";
echo 'Compatibility Mode: ';
if (isset($GLOBALS['wpmdb_compatibility'])) {
echo 'Yes';
} else {
echo 'No';
}
echo "\r\n";
echo "\r\n";
echo "Active Plugins:\r\n";
if (isset($GLOBALS['wpmdb_compatibility'])) {
remove_filter('option_active_plugins', 'wpmdbc_exclude_plugins');
remove_filter('site_option_active_sitewide_plugins', 'wpmdbc_exclude_site_plugins');
$blacklist = array_flip($this->settings['blacklist_plugins']);
} else {
$blacklist = array();
}
$active_plugins = (array) get_option('active_plugins', array());
if (is_multisite()) {
$network_active_plugins = wp_get_active_network_plugins();
$active_plugins = array_map(array($this, 'remove_wp_plugin_dir'), $network_active_plugins);
}
foreach ($active_plugins as $plugin) {
$suffix = isset($blacklist[$plugin]) ? '*' : '';
$this->print_plugin_details(WP_PLUGIN_DIR . '/' . $plugin, $suffix);
}
if (isset($GLOBALS['wpmdb_compatibility'])) {
add_filter('option_active_plugins', 'wpmdbc_exclude_plugins');
add_filter('site_option_active_sitewide_plugins', 'wpmdbc_exclude_site_plugins');
}
$mu_plugins = wp_get_mu_plugins();
if ($mu_plugins) {
echo "\r\n";
echo "Must-use Plugins:\r\n";
foreach ($mu_plugins as $mu_plugin) {
$this->print_plugin_details($mu_plugin);
}
}
echo "\r\n";
do_action('wpmdb_diagnostic_info');
}
开发者ID:MadGenius88,项目名称:GameDevLou.org,代码行数:101,代码来源:wpmdb.php
示例10: helper_installed
public function helper_installed()
{
$plugins = wp_get_mu_plugins();
foreach ($plugins as $plugin) {
if (false !== strpos($plugin, 'ShoppServices.php')) {
return true;
}
}
return false;
}
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:10,代码来源:System.php
示例11: adaptive_images_debug_diagnostic_info
/**
* Gets all kinds of system installation info. Kudos to WP-Migrate-DB and Send-System-Info plugins for the most of
* this.
*
* @author Nevma ([email protected])
*
* @return void Nothing really!
*/
function adaptive_images_debug_diagnostic_info($echo = true)
{
global $table_prefix;
global $wpdb;
// Collect diagnostic information.
$debug = array();
$debug['Web Server'] = esc_html($_SERVER['SERVER_SOFTWARE']);
$debug['Document Root'] = esc_html($_SERVER['DOCUMENT_ROOT']);
$debug['PHP'] = esc_html(phpversion());
$debug['PHP Time Limit'] = esc_html(ini_get('max_execution_time'));
$debug['PHP Memory Limit'] = esc_html(ini_get('memory_limit'));
$debug['PHP Post Max Size'] = esc_html(ini_get('post_max_size'));
$debug['PHP Upload Max Size'] = esc_html(ini_get('upload_max_filesize'));
$debug['PHP Max Input Vars'] = esc_html(ini_get('max_input_vars'));
$debug['PHP Display Errors'] = esc_html(ini_get('display_errors') ? 'Yes' : 'No');
$debug['PHP Error Log'] = esc_html(ini_get('error_log'));
$debug['MySQL'] = esc_html(empty($wpdb->use_mysqli) ? mysql_get_server_info() : mysqli_get_server_info($wpdb->dbh));
$debug['MySQL Ext/mysqli'] = empty($wpdb->use_mysqli) ? 'No' : 'Yes';
$debug['MySQL Table Prefix'] = esc_html($table_prefix);
$debug['MySQL DB Charset'] = esc_html(DB_CHARSET);
$debug['WP'] = get_bloginfo('version');
$debug['WP Multisite'] = is_multisite() ? 'Yes' : 'No';
$debug['WP Debug Mode'] = esc_html(defined('WP_DEBUG') && WP_DEBUG ? 'Yes' : 'No');
$debug['WP Site url'] = esc_html(site_url());
$debug['WP WP Home url'] = esc_html(home_url());
$debug['WP Permalinks'] = esc_html(get_option('permalink_structure'));
$debug['WP home path'] = esc_html(get_home_path());
$debug['WP content dir'] = esc_html(WP_CONTENT_DIR);
$debug['WP plugin dir'] = esc_html(WP_PLUGIN_DIR);
$debug['WP content url'] = esc_html(WP_CONTENT_URL);
$debug['WP plugin url'] = esc_html(WP_PLUGIN_URL);
$debug['WP Locale'] = esc_html(get_locale());
$debug['WP Memory Limit'] = esc_html(WP_MEMORY_LIMIT);
$debug['WP Max Upload Size'] = esc_html(adaptive_images_plugin_file_size_human(wp_max_upload_size()));
// Active system plugins.
$active_plugins = (array) get_option('active_plugins', array());
$active_plugins_output = '';
foreach ($active_plugins as $plugin) {
$plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
$active_plugins_output .= $plugin_data['Name'] . ' v.' . $plugin_data['Version'] . ' by ' . $plugin_data['AuthorName'] . '<br />';
}
$debug['WP Active plugins'] = $active_plugins_output;
// Multisite (network) plugins.
if (is_multisite()) {
$network_active_plugins = wp_get_active_network_plugins();
$active_plugins_output = '';
if (count($network_active_plugins) > 0) {
foreach ($network_active_plugins as $plugin) {
$plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
$active_plugins_output .= $plugin_data['Name'] . ' v.' . $plugin_data['Version'] . ' by ' . $plugin_data['AuthorName'] . '<br />';
}
}
$debug['WP Network active plugins'] = $active_plugins_output;
}
// Must-use plugins.
$mu_plugins = wp_get_mu_plugins();
$active_plugins_output = '';
if (count($mu_plugins) > 0) {
foreach ($mu_plugins as $plugin) {
$plugin_data = get_plugin_data($plugin);
$active_plugins_output .= $plugin_data['Name'] . ' v.' . $plugin_data['Version'] . ' by ' . $plugin_data['AuthorName'] . '<br />';
}
}
$debug['WP MU plugins'] = $active_plugins_output;
// Create diagnostic output HTML table.
$debug_output = '<table><tbody>';
foreach ($debug as $key => $value) {
$debug_output .= '<tr>' . '<td style = "vertical-align: top; whitespace: nowrap; padding-right: 5px;">' . $key . '</td>' . '<td><p style = "margin: 0; padding: 0 0 2px 0;">' . $value . '</p></td>' . '</tr>';
}
$debug_output .= '</tbody></table>';
// Echo debug info or return it.
if ($echo) {
echo $debug_output;
} else {
return $debug_output;
}
}
开发者ID:bchamberlain88,项目名称:pavati,代码行数:85,代码来源:adaptive-images-debug.php
示例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);
}
开发者ID:ksan5835,项目名称:rankproperties,代码行数:21,代码来源:class-utility.php
示例13: load_plugins_wpml_config
function load_plugins_wpml_config()
{
$plugins = get_option('active_plugins');
foreach ($plugins as $p) {
$config_file = ABSPATH . '/' . PLUGINDIR . '/' . dirname($p) . '/wpml-config.xml';
if (trim(dirname($p), '\\/.') && file_exists($config_file)) {
$this->wpml_config_files[] = $config_file;
}
}
$mu_plugins = wp_get_mu_plugins();
if (!empty($mu_plugins)) {
foreach ($mu_plugins as $mup) {
if (rtrim(dirname($mup), '/') != WPMU_PLUGIN_DIR) {
$config_file = dirname($mup) . '/wpml-config.xml';
$this->wpml_config_files[] = $config_file;
}
}
}
}
开发者ID:jimlongo56,项目名称:bhouse,代码行数:19,代码来源:translation-management.class.php
示例14: load_plugins_wpml_config
function load_plugins_wpml_config()
{
if (is_multisite()) {
// Get multi site plugins
$plugins = get_site_option('active_sitewide_plugins');
if (!empty($plugins)) {
foreach ($plugins as $p => $dummy) {
$config_file = WP_PLUGIN_DIR . '/' . dirname($p) . '/wpml-config.xml';
if (trim(dirname($p), '\\/.') && file_exists($config_file)) {
$this->wpml_config_files[] = $config_file;
}
}
}
}
// Get single site or current blog active plugins
$plugins = get_option('active_plugins');
if (!empty($plugins)) {
foreach ($plugins as $p) {
$config_file = WP_PLUGIN_DIR . '/' . dirname($p) . '/wpml-config.xml';
if (trim(dirname($p), '\\/.') && file_exists($config_file)) {
$this->wpml_config_files[] = $config_file;
}
}
}
// Get the must-use plugins
$mu_plugins = wp_get_mu_plugins();
if (!empty($mu_plugins)) {
foreach ($mu_plugins as $mup) {
if (rtrim(dirname($mup), '/') != WPMU_PLUGIN_DIR) {
$config_file = dirname($mup) . '/wpml-config.xml';
$this->wpml_config_files[] = $config_file;
}
}
}
}
开发者ID:GaryJones,项目名称:TPWP,代码行数:35,代码来源:translation-management.class.php
示例15: localization
function localization()
{
// Load up the localization file if we're using WordPress in a different language
// Place it in this plugin's "languages" folder and name it "mp-[value in wp-config].mo"
$mu_plugins = wp_get_mu_plugins();
$lang_dir = dirname(plugin_basename($this->plugin_file)) . '/marketpress-includes/languages/';
$custom_path = WP_LANG_DIR . '/marketpress/mp-' . get_locale() . '.mo';
if (file_exists($custom_path)) {
load_textdomain('mp', $custom_path);
} elseif (in_array($this->plugin_file, $mu_plugins)) {
load_muplugin_textdomain('mp', $lang_dir);
} else {
load_plugin_textdomain('mp', false, $lang_dir);
}
//setup language code for jquery datepicker translation
$temp_locales = explode('_', get_locale());
$this->language = $temp_locales[0] ? $temp_locales[0] : 'en';
}
开发者ID:vilmark,项目名称:vilmark_main,代码行数:18,代码来源:marketpress.php
注:本文中的wp_get_mu_plugins函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论