From 200a157663e8b1c763dc83e68ad123f7e9b8b292 Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Tue, 23 Feb 2016 14:18:11 +0545 Subject: [PATCH 1/3] Stop message moving using css class inline, Fixes #10400 --- includes/admin/class-wc-admin-status.php | 23 +++++++++---------- .../importers/class-wc-tax-rate-importer.php | 2 +- .../admin/views/html-admin-page-reports.php | 11 ++++----- .../views/html-admin-page-status-logs.php | 2 +- .../views/html-admin-page-status-report.php | 2 +- .../admin/views/html-admin-page-status.php | 7 +++--- includes/admin/views/html-admin-settings.php | 7 ++---- 7 files changed, 23 insertions(+), 31 deletions(-) diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index b6e2c5178e2..6c95ab58a20 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -47,7 +47,7 @@ class WC_Admin_Status { wc_delete_shop_order_transients(); WC_Cache_Helper::get_transient_version( 'shipping', true ); - echo '

' . __( 'Product Transients Cleared', 'woocommerce' ) . '

'; + echo '

' . __( 'Product Transients Cleared', 'woocommerce' ) . '

'; break; case 'clear_expired_transients' : @@ -72,15 +72,14 @@ class WC_Admin_Status { AND b.option_value < %d"; $rows2 = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); - echo '

' . sprintf( __( '%d Transients Rows Cleared', 'woocommerce' ), $rows + $rows2 ) . '

'; - + echo '

' . sprintf( __( '%d Transients Rows Cleared', 'woocommerce' ), $rows + $rows2 ) . '

'; break; case 'reset_roles' : // Remove then re-add caps and roles WC_Install::remove_roles(); WC_Install::create_roles(); - echo '

' . __( 'Roles successfully reset', 'woocommerce' ) . '

'; + echo '

' . __( 'Roles successfully reset', 'woocommerce' ) . '

'; break; case 'recount_terms' : @@ -92,7 +91,7 @@ class WC_Admin_Status { _wc_term_recount( $product_tags, get_taxonomy( 'product_tag' ), true, false ); - echo '

' . __( 'Terms successfully recounted', 'woocommerce' ) . '

'; + echo '

' . __( 'Terms successfully recounted', 'woocommerce' ) . '

'; break; case 'clear_sessions' : @@ -100,11 +99,11 @@ class WC_Admin_Status { wp_cache_flush(); - echo '

' . __( 'Sessions successfully cleared', 'woocommerce' ) . '

'; + echo '

' . __( 'Sessions successfully cleared', 'woocommerce' ) . '

'; break; case 'install_pages' : WC_Install::create_pages(); - echo '

' . __( 'All missing WooCommerce pages was installed successfully.', 'woocommerce' ) . '

'; + echo '

' . __( 'All missing WooCommerce pages was installed successfully.', 'woocommerce' ) . '

'; break; case 'delete_taxes' : @@ -112,13 +111,13 @@ class WC_Admin_Status { $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}woocommerce_tax_rate_locations;" ); WC_Cache_Helper::incr_cache_prefix( 'taxes' ); - echo '

' . __( 'Tax rates successfully deleted', 'woocommerce' ) . '

'; + echo '

' . __( 'Tax rates successfully deleted', 'woocommerce' ) . '

'; break; case 'reset_tracking' : delete_option( 'woocommerce_allow_tracking' ); WC_Admin_Notices::add_notice( 'tracking' ); - echo '

' . __( 'Usage tracking settings successfully reset.', 'woocommerce' ) . '

'; + echo '

' . __( 'Usage tracking settings successfully reset.', 'woocommerce' ) . '

'; break; default : $action = esc_attr( $_GET['action'] ); @@ -127,10 +126,10 @@ class WC_Admin_Status { $return = call_user_func( $callback ); if ( $return === false ) { if ( is_array( $callback ) ) { - echo '

' . sprintf( __( 'There was an error calling %s::%s', 'woocommerce' ), get_class( $callback[0] ), $callback[1] ) . '

'; + echo '

' . sprintf( __( 'There was an error calling %s::%s', 'woocommerce' ), get_class( $callback[0] ), $callback[1] ) . '

'; } else { - echo '

' . sprintf( __( 'There was an error calling %s', 'woocommerce' ), $callback ) . '

'; + echo '

' . sprintf( __( 'There was an error calling %s', 'woocommerce' ), $callback ) . '

'; } } } @@ -140,7 +139,7 @@ class WC_Admin_Status { // Display message if settings settings have been saved if ( isset( $_REQUEST['settings-updated'] ) ) { - echo '

' . __( 'Your changes have been saved.', 'woocommerce' ) . '

'; + echo '

' . __( 'Your changes have been saved.', 'woocommerce' ) . '

'; } include_once( 'views/html-admin-page-status-tools.php' ); diff --git a/includes/admin/importers/class-wc-tax-rate-importer.php b/includes/admin/importers/class-wc-tax-rate-importer.php index dec0564832f..c9105cf543a 100644 --- a/includes/admin/importers/class-wc-tax-rate-importer.php +++ b/includes/admin/importers/class-wc-tax-rate-importer.php @@ -166,7 +166,7 @@ class WC_Tax_Rate_Importer extends WP_Importer { } // Show Result - echo '

+ echo '

' . sprintf( __( 'Import complete - imported %s tax rates.', 'woocommerce' ), $loop ) . '

'; diff --git a/includes/admin/views/html-admin-page-reports.php b/includes/admin/views/html-admin-page-reports.php index e8f932d000c..c77f088a38e 100644 --- a/includes/admin/views/html-admin-page-reports.php +++ b/includes/admin/views/html-admin-page-reports.php @@ -8,23 +8,20 @@ if ( ! defined( 'ABSPATH' ) ) { } ?> -

-

- - 1 ) { ?>
    diff --git a/includes/admin/views/html-admin-page-status-logs.php b/includes/admin/views/html-admin-page-status-logs.php index 80fa8b2780c..ab8a7217a32 100644 --- a/includes/admin/views/html-admin-page-status-logs.php +++ b/includes/admin/views/html-admin-page-status-logs.php @@ -30,5 +30,5 @@ if ( ! defined( 'ABSPATH' ) ) {
-

+

diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index 081d5b94886..c03d6480fa1 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) { } ?> -
+

diff --git a/includes/admin/views/html-admin-page-status.php b/includes/admin/views/html-admin-page-status.php index ee45ce6db73..4e6313ec08d 100644 --- a/includes/admin/views/html-admin-page-status.php +++ b/includes/admin/views/html-admin-page-status.php @@ -13,13 +13,12 @@ $tabs = array( 'tools' => __( 'Tools', 'woocommerce' ), 'logs' => __( 'Logs', 'woocommerce' ), ); + ?>

-

- - " id="mainform" action="" enctype="multipart/form-data">

- - -

From e8077b4f9d86c79f9d57cc8eba1694d2121b78b6 Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Tue, 23 Feb 2016 14:42:22 +0545 Subject: [PATCH 2/3] Remove new line --- includes/admin/class-wc-admin-status.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index 6c95ab58a20..33deb2125c7 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -127,7 +127,6 @@ class WC_Admin_Status { if ( $return === false ) { if ( is_array( $callback ) ) { echo '

' . sprintf( __( 'There was an error calling %s::%s', 'woocommerce' ), get_class( $callback[0] ), $callback[1] ) . '

'; - } else { echo '

' . sprintf( __( 'There was an error calling %s', 'woocommerce' ), $callback ) . '

'; } From 162e6f874e11cb55d89919a35056229d975b7d3a Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Tue, 23 Feb 2016 14:56:02 +0545 Subject: [PATCH 3/3] Tweak some lines endings for views --- includes/admin/views/html-admin-page-addons.php | 1 + includes/admin/views/html-admin-page-reports.php | 2 +- includes/admin/views/html-admin-page-status-logs.php | 1 - includes/admin/views/html-admin-page-status-tools.php | 1 - includes/admin/views/html-admin-settings.php | 1 + 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/admin/views/html-admin-page-addons.php b/includes/admin/views/html-admin-page-addons.php index bf1b9b086d6..b001413a34b 100644 --- a/includes/admin/views/html-admin-page-addons.php +++ b/includes/admin/views/html-admin-page-addons.php @@ -8,6 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } + ?>

diff --git a/includes/admin/views/html-admin-page-reports.php b/includes/admin/views/html-admin-page-reports.php index c77f088a38e..489ff9457e9 100644 --- a/includes/admin/views/html-admin-page-reports.php +++ b/includes/admin/views/html-admin-page-reports.php @@ -4,7 +4,7 @@ */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; } ?> diff --git a/includes/admin/views/html-admin-page-status-logs.php b/includes/admin/views/html-admin-page-status-logs.php index ab8a7217a32..4f2ef9461e9 100644 --- a/includes/admin/views/html-admin-page-status-logs.php +++ b/includes/admin/views/html-admin-page-status-logs.php @@ -8,7 +8,6 @@ if ( ! defined( 'ABSPATH' ) ) { } ?> -
diff --git a/includes/admin/views/html-admin-page-status-tools.php b/includes/admin/views/html-admin-page-status-tools.php index 5a40061831c..f6758482f50 100644 --- a/includes/admin/views/html-admin-page-status-tools.php +++ b/includes/admin/views/html-admin-page-status-tools.php @@ -8,7 +8,6 @@ if ( ! defined( 'ABSPATH' ) ) { } ?> -
0, 'template_debug_mode' => 0, 'shipping_debug_mode' => 0 ) ); ?> diff --git a/includes/admin/views/html-admin-settings.php b/includes/admin/views/html-admin-settings.php index 07ffd563d9b..7e50dd5f77a 100644 --- a/includes/admin/views/html-admin-settings.php +++ b/includes/admin/views/html-admin-settings.php @@ -5,6 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } + ?>