From a56b93a14397c878864ea4190b7a6950e9011747 Mon Sep 17 00:00:00 2001 From: shivapoudel Date: Sat, 7 Mar 2015 09:01:08 +0545 Subject: [PATCH 1/3] Tweaks for System Status --- includes/admin/class-wc-admin-status.php | 32 +++---- .../views/html-admin-page-status-logs.php | 6 +- .../views/html-admin-page-status-report.php | 95 +++++++++---------- .../views/html-admin-page-status-tools.php | 2 +- 4 files changed, 65 insertions(+), 70 deletions(-) diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index dc61e04be67..34f80edcc4a 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -9,7 +9,7 @@ */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } /** @@ -189,34 +189,33 @@ class WC_Admin_Status { /** * Get tools - * * @return array of tools */ public static function get_tools() { $tools = array( 'clear_transients' => array( - 'name' => __( 'WC Transients','woocommerce'), - 'button' => __('Clear transients','woocommerce'), + 'name' => __( 'WC Transients', 'woocommerce' ), + 'button' => __( 'Clear transients', 'woocommerce' ), 'desc' => __( 'This tool will clear the product/shop transients cache.', 'woocommerce' ), ), 'clear_expired_transients' => array( - 'name' => __( 'Expired Transients','woocommerce'), - 'button' => __('Clear expired transients','woocommerce'), + 'name' => __( 'Expired Transients', 'woocommerce' ), + 'button' => __( 'Clear expired transients', 'woocommerce' ), 'desc' => __( 'This tool will clear ALL expired transients from WordPress.', 'woocommerce' ), ), 'recount_terms' => array( - 'name' => __('Term counts','woocommerce'), - 'button' => __('Recount terms','woocommerce'), + 'name' => __( 'Term counts', 'woocommerce' ), + 'button' => __( 'Recount terms', 'woocommerce' ), 'desc' => __( 'This tool will recount product terms - useful when changing your settings in a way which hides products from the catalog.', 'woocommerce' ), ), 'reset_roles' => array( - 'name' => __('Capabilities','woocommerce'), - 'button' => __('Reset capabilities','woocommerce'), + 'name' => __( 'Capabilities', 'woocommerce' ), + 'button' => __( 'Reset capabilities', 'woocommerce' ), 'desc' => __( 'This tool will reset the admin, customer and shop_manager roles to default. Use this if your users cannot access all of the WooCommerce admin pages.', 'woocommerce' ), ), 'clear_sessions' => array( - 'name' => __('Customer Sessions','woocommerce'), - 'button' => __('Clear all sessions','woocommerce'), + 'name' => __( 'Customer Sessions', 'woocommerce' ), + 'button' => __( 'Clear all sessions', 'woocommerce' ), 'desc' => __( 'Warning: This tool will delete all customer session data from the database, including any current live carts.', 'woocommerce' ), ), 'install_pages' => array( @@ -265,9 +264,8 @@ class WC_Admin_Status { /** * Retrieve metadata from a file. Based on WP Core's get_file_data function - * - * @since 2.1.1 - * @param string $file Path to the file + * @since 2.1.1 + * @param string $file Path to the file * @return string */ public static function get_file_version( $file ) { @@ -298,8 +296,7 @@ class WC_Admin_Status { /** * Scan the template files - * - * @param string $template_path + * @param string $template_path * @return array */ public static function scan_template_files( $template_path ) { @@ -329,7 +326,6 @@ class WC_Admin_Status { /** * Scan the log files - * * @return array */ public static function scan_log_files() { diff --git a/includes/admin/views/html-admin-page-status-logs.php b/includes/admin/views/html-admin-page-status-logs.php index 41939e5f41b..a7b93eb5ccd 100644 --- a/includes/admin/views/html-admin-page-status-logs.php +++ b/includes/admin/views/html-admin-page-status-logs.php @@ -4,7 +4,7 @@ */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } ?> @@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) { - +
@@ -31,4 +31,4 @@ if ( ! defined( 'ABSPATH' ) ) {

- \ No newline at end of file + diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index d688186b66f..d8282f97a88 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -4,7 +4,7 @@ */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } ?> @@ -28,27 +28,27 @@ if ( ! defined( 'ABSPATH' ) ) { : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> version ); ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> ' . '✔ ' . WC_LOG_DIR . ' '; @@ -59,17 +59,17 @@ if ( ! defined( 'ABSPATH' ) ) { : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> ' . '✔' . ''; else echo '' . '–' . ''; ?> : - [?]'; ?> + [?]'; ?> @@ -101,40 +101,39 @@ if ( ! defined( 'ABSPATH' ) ) { : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> + [?]'; ?> : - [?]'; ?> - [?]'; ?> + ' . '✕ ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'woocommerce' ), $default_timezone ) . ''; @@ -165,7 +164,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat // fsockopen/cURL $posting['fsockopen_curl']['name'] = 'fsockopen/cURL'; - $posting['fsockopen_curl']['help'] = '[?]'; + $posting['fsockopen_curl']['help'] = '[?]'; if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) { $posting['fsockopen_curl']['success'] = true; @@ -176,7 +175,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat // SOAP $posting['soap_client']['name'] = 'SoapClient'; - $posting['soap_client']['help'] = '[?]'; + $posting['soap_client']['help'] = '[?]'; if ( class_exists( 'SoapClient' ) ) { $posting['soap_client']['success'] = true; @@ -187,7 +186,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat // DOMDocument $posting['dom_document']['name'] = 'DOMDocument'; - $posting['dom_document']['help'] = '[?]'; + $posting['dom_document']['help'] = '[?]'; if ( class_exists( 'DOMDocument' ) ) { $posting['dom_document']['success'] = true; @@ -198,7 +197,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat // GZIP $posting['gzip']['name'] = 'GZip'; - $posting['gzip']['help'] = '[?]'; + $posting['gzip']['help'] = '[?]'; if ( is_callable( 'gzopen' ) ) { $posting['gzip']['success'] = true; @@ -209,7 +208,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat // WP Remote Post Check $posting['wp_remote_post']['name'] = __( 'Remote Post', 'woocommerce'); - $posting['wp_remote_post']['help'] = '[?]'; + $posting['wp_remote_post']['help'] = '[?]'; $response = wp_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array( 'sslverify' => false, @@ -234,7 +233,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat // WP Remote Get Check $posting['wp_remote_get']['name'] = __( 'Remote Get', 'woocommerce'); - $posting['wp_remote_get']['help'] = '[?]'; + $posting['wp_remote_get']['help'] = '[?]'; $response = wp_remote_get( 'http://www.woothemes.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) ); @@ -257,8 +256,8 @@ If enabled on your server, Suhosin may need to be configured to increase its dat ?> : - - + + @@ -374,47 +373,47 @@ If enabled on your server, Suhosin may need to be configured to increase its dat : - [?]'; ?> + [?]'; ?> '.'✔'.'' : ''.'–'.''; ?> - [?]'; ?> + [?]'; ?> ' . '✔' . '' : '' . '–' . ''; ?> - [?]'; ?> + [?]'; ?> ' . '✔' . '' : '' . '–' . ''; ?> : - [?]'; ?> + [?]'; ?> '.'✔'.'' : ''.'–'.''; ?> - [?]'; ?> + [?]'; ?> () - [?]'; ?> + [?]'; ?> - [?]'; ?> + [?]'; ?> - [?]'; ?> + [?]'; ?> - [?]'; ?> + [?]'; ?> @@ -554,12 +553,12 @@ If enabled on your server, Suhosin may need to be configured to increase its dat : - [?]'; ?> + [?]'; ?> Name; ?> : - [?]'; ?> + [?]'; ?> Version; @@ -570,12 +569,12 @@ If enabled on your server, Suhosin may need to be configured to increase its dat : - [?]'; ?> + [?]'; ?> {'Author URI'}; ?> : - [?]'; ?> + [?]'; ?> ' . '✔' . '' : '✕ – ' . sprintf( __( 'If you\'re modifying WooCommerce or a parent theme you didn\'t build personally we recommend using a child theme. See: How to create a child theme', 'woocommerce' ), 'http://codex.wordpress.org/Child_Themes' ); ?> @@ -586,23 +585,23 @@ If enabled on your server, Suhosin may need to be configured to increase its dat ?> : - [?]'; ?> + [?]'; ?> Name; ?> : - [?]'; ?> + [?]'; ?> Version; ?> : - [?]'; ?> + [?]'; ?> {'Author URI'}; ?> : - [?]'; ?> + [?]'; ?> template, wc_get_core_supported_themes() ) ) { echo '' . __( 'Not Declared', 'woocommerce' ) . ''; @@ -616,7 +615,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat - + diff --git a/includes/admin/views/html-admin-page-status-tools.php b/includes/admin/views/html-admin-page-status-tools.php index 83d9cb0bac2..66220ad06fd 100644 --- a/includes/admin/views/html-admin-page-status-tools.php +++ b/includes/admin/views/html-admin-page-status-tools.php @@ -4,7 +4,7 @@ */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } ?> From 58b6b54e77dca5fc156802b3d05d5c7997dc5198 Mon Sep 17 00:00:00 2001 From: shivapoudel Date: Sat, 7 Mar 2015 09:03:14 +0545 Subject: [PATCH 2/3] Fix the large gap in System Status -> Server Environment after [?] --- includes/admin/views/html-admin-page-status-report.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index d8282f97a88..3f857c38d51 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -149,8 +149,8 @@ if ( ! defined( 'ABSPATH' ) ) { - - +
[?]'; ?>[?]'; ?>
:[?]'; ?>[?]'; ?>' . '✕ ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'woocommerce' ), $default_timezone ) . ''; From 3b0bd8bdc66752e5c419e9af36bcc31ae1bf9669 Mon Sep 17 00:00:00 2001 From: shivapoudel Date: Sat, 7 Mar 2015 09:14:49 +0545 Subject: [PATCH 3/3] Visit Plugin homepage in new tab --- includes/admin/views/html-admin-page-status-report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index 3f857c38d51..5d9b3fb7863 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -320,7 +320,7 @@ if ( ! defined( 'ABSPATH' ) ) { $plugin_name = esc_html( $plugin_data['Name'] ); if ( ! empty( $plugin_data['PluginURI'] ) ) { - $plugin_name = '' . $plugin_name . ''; + $plugin_name = '' . $plugin_name . ''; } if ( strstr( $dirname, 'woocommerce-' ) ) {