System Status", "essb" ), __ ( "
Share Counter Test", "essb" ) ), array ("element_id" => "system", 'active_tab' => $mark_active ) );
ESSBOptionsFramework::draw_tab_start ( array ("element_id" => "system-0", "active" => ($active_tab == "system-0" ? "true" : "false") ) );
?>
' . $plugin_name . '';
}
$pluginList .= '
' . $plugin_data ['Name'] . ' slug: ' . $plugin_data ['TextDomain'] . ', author: ' . $plugin_data ['Author'] . ' |
' . $plugin_data ['Version'] . ' ' . $plugin_data ['PluginURI'] . ' |
';
}
}
$remote_get_status = '';
$remote_post_status = '';
$response = wp_safe_remote_get( 'https://build.envato.com/api/', array( 'decompress' => false, 'user-agent' => 'passionblogger-remote-get-test' ) );
$remote_get_status = ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) ? '
✔' : '
wp_remote_get() failed. Some theme features may not work. Please contact your hosting provider for additional information.';
$response = wp_safe_remote_post( 'https://envato.com/', array( 'decompress' => false, 'user-agent' => 'passionblogger-remote-get-test' ) );
$remote_post_status = ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) ? '
✔' : '
wp_remote_get() failed. Some theme features may not work. Please contact your hosting provider for additional information.';
if (function_exists ( 'fsockopen' )) {
$fsockopen = '
Enabled';
} else {
$fsockopen = '
Disabled';
}
if (function_exists ( 'curl_version' )) {
$curl_version = curl_version ();
$curl_status = '
Enabled: v' . $curl_version ['version'] . '';
} else {
$curl_status = '
Disabled';
}
$theme = wp_get_theme ();
$time_limit = ini_get( 'max_execution_time' );
if ( 180 > $time_limit && 0 != $time_limit ) {
$time_limit = '
' . sprintf( __( '%1$s - We recommend setting max execution time to at least 180 if you use share counters or share counter recovery.
See: Increasing max execution to PHP', 'passionblogger' ), $time_limit, 'http://codex.wordpress.org/Common_WordPress_Errors#Maximum_execution_time_exceeded' ) . '';
} else {
$time_limit = '
' . $time_limit . '';
}
$memory = let_to_num( WP_MEMORY_LIMIT );
if ( $memory < 64000000 ) {
$memory = '
' . sprintf( __( '%1$s - We recommend setting memory to at least 128MB.
Please define memory limit in wp-config.php file. To learn how, see: Increasing memory allocated to PHP.', 'passionblogger' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '';
} else {
$memory = '
' . size_format( $memory ) . '';
if ( $memory < 128000000 ) {
$memory .= '
' . __( 'Your current memory limit is sufficient, but if you use lot of plugins on site or you have many posts you may need to exceed it.', 'passionblogger' ) . '';
}
}
// Get the memory from PHP's configuration.
$memory_php = ini_get( 'memory_limit' );
// If we can't get it, fallback to WP_MEMORY_LIMIT.
if ( ! $memory || -1 === $memory ) {
$memory_php = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );
}
// Make sure the value is properly formatted in bytes.
if ( ! is_numeric( $memory_php ) ) {
$memory_php = wp_convert_hr_to_bytes( $memory_php );
}
if ( $memory_php < 64000000 ) {
$memory_php = '
' . sprintf( __( '%1$s - We recommend setting memory to at least 128MB.
Please define memory limit in wp-config.php file. To learn how, see: Increasing memory allocated to PHP.', 'passionblogger' ), size_format( $memory_php ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '';
} else {
$memory_php = '
' . size_format( $memory_php ) . '';
}
$max_input_vars = ini_get( 'max_input_vars' );
if ($max_input_vars < 1000) {
$max_input_vars .= '
Max input vars limitation will truncate POST data and some options may not save. We recommed to setup at least 1000. See: Increasing max input vars limit.';
}
if ($max_input_vars > 999 && $max_input_vars < 5000) {
$max_input_vars .= '
Current value of max input vars may prevent some options to save - for example in Where to display section. If you face such problem we recommend to increase value at setup 5000 or deactive display methods and functions that you do not use from Advanced Settings -> Deactivate Functions & Modules. See: Increasing max input vars limit.';
}
$system_status = '
Environment Statuses | |
Home URL | ' . get_home_url () . ' |
Site URL | ' . get_site_url () . ' |
WordPress Version | ' . get_bloginfo ( 'version' ) . ' |
PHP Version | ' . phpversion () . ' |
Easy Social Share Buttons version | ' . ESSB3_VERSION . ' |
WP Memory Limit | ' . $memory . ' |
PHP Memory Limit | ' . $memory_php . ' |
Max Post Size | ' . ini_get('post_max_size') . ' |
Max Upload Size | ' . size_format(wp_max_upload_size()) . ' |
PHP Time Limit | ' . $time_limit . ' |
Max Input Vars | ' . $max_input_vars . ' |
Connection Statuses | |
fsockopen | ' . $fsockopen . ' |
cURL | ' . $curl_status . ' |
WP Remote Get | ' . $remote_get_status . ' |
WP Remote Post | ' . $remote_post_status . ' |
Active Theme | |
Theme Name | ' . $theme ['Name'] . ' |
Theme Version | ' . $theme ['Version'] . ' |
Theme Author | ' . $theme->get ('Author') . ' |
Active Plugins | |
Number of Active Plugins | ' . count( (array) get_option( 'active_plugins' ) ) . ' |
' . $pluginList . '
';
echo $system_status;
?>
"system-1", "active" => ($active_tab == "system-1" ? "true" : "false") ) );
$url = isset($_REQUEST['url']) ? $_REQUEST['url'] : '';
?>