$plugin_slug, 'fields' => array( 'versions' => true ), ) ); if ( version_compare( $plugin_data['Version'], $plugin_info->version, '<' ) ) { // Update available return '' . __( 'Update available.', AGY_TEXT_DOMAIN ) . ''; } else { // Up to date return '' . __( 'No update available.', AGY_TEXT_DOMAIN ) . ''; } } function agy_if_wp_update_available() { $current_version = get_bloginfo( 'version' ); $latest_version = get_core_updates()['0']->current; if ( version_compare( $current_version, $latest_version, '<' ) ) { return '' . __( 'Update available', AGY_TEXT_DOMAIN ) . ''; } else { return '' . __( 'No update available', AGY_TEXT_DOMAIN ) . ''; } } function agy_if_debug_log() { if ( WP_DEBUG ) { return '' . __( 'Debug log is turned on. Please disable it.', AGY_TEXT_DOMAIN ) . ''; } else { return '' . __( 'Debug log is turned off', AGY_TEXT_DOMAIN ) . ''; } } function agy_active_plugins( $number = false, $separator = ', ' ) { $active_plugins = array(); foreach ( get_option( 'active_plugins', array() ) as $plugin ) { $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); if ( isset( $plugin_data['Name'] ) ) { $active_plugins[] = $plugin_data['Name']; } } if ( $number ) { return count( $active_plugins ); } else { return implode( $separator, $active_plugins ); } } function agy_themes( $number = false ) { $themes = wp_get_themes(); $theme_names = array_map( function ( $theme ) { return $theme->Name; }, $themes ); if ( $number ) { echo count( $themes ); } else { echo implode( ', ', $theme_names ); } } function agy_get_latest_plugin_version( $plugin_name ) { $args = array( 'slug' => $plugin_name, 'fields' => array( 'version' ), ); $response = plugins_api( 'plugin_information', $args ); if ( is_wp_error( $response ) ) { return false; } return $response->version; } function agy_if_ssl() { if ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ) { return '' . __( 'Active SSL certificate', AGY_TEXT_DOMAIN ) . ''; } else { return '' . __( 'No active SSL certificate.', AGY_TEXT_DOMAIN ) . ''; } } ?>

db_version() ?> db_version(), AGY_TEXT_DOMAIN ) ?>

$plugin_info ) { if ( is_plugin_active( $plugin_path ) ) { $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_path ); $latest_version = agy_get_latest_plugin_version( $plugin_data['Name'] ); echo ''; echo ''; echo ''; if ( version_compare( $latest_version, $plugin_data['Version'], '>' ) ) { echo ''; } else { echo ''; } echo ''; } } ?>
' . $plugin_info['Name'] . '' . $plugin_info['Version'] . '' . __( 'Update available', AGY_TEXT_DOMAIN ) . '' . __( 'No update available', AGY_TEXT_DOMAIN ) . '

'; echo ''; echo ''; $theme_updates = get_theme_updates(); if ( isset( $theme_updates[ $theme->get_stylesheet() ] ) ) { echo ''; } else { echo ''; } echo ''; } ?>
' . $theme->get( 'Name' ) . '' . $theme->get( 'Version' ) . 'Update availableNo update available
db_version(); //$debug_enabled = WP_DEBUG ? 'true' : 'false'; //$error_log = ini_get( 'error_log' ); //$latest_version = defined( 'AGY_PLUGIN_VERSION' ) ? AGY_PLUGIN_VERSION : ''; //$memory_limit = ini_get( 'memory_limit' ); //$upload_max_filesize = ini_get( 'upload_max_filesize' ); //$post_max_size = ini_get( 'post_max_size' ); //$max_execution_time = ini_get( 'max_execution_time' ); //$max_input_time = ini_get( 'max_input_time' ); //$output = ''; //$output .= '

Site Status

'; //$output .= ''; //$output .= '
'; //$output .= ''; //$output = '
' . $output . '
'; //echo $output; ?>