Merge pull request #10411 from shivapoudel/inline-notice

Stop message moving using css class inline
This commit is contained in:
Mike Jolley 2016-02-23 11:13:47 +00:00
commit 07d4979cb5
9 changed files with 26 additions and 35 deletions

View File

@ -47,7 +47,7 @@ class WC_Admin_Status {
wc_delete_shop_order_transients();
WC_Cache_Helper::get_transient_version( 'shipping', true );
echo '<div class="updated"><p>' . __( 'Product Transients Cleared', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Product Transients Cleared', 'woocommerce' ) . '</p></div>';
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 '<div class="updated"><p>' . sprintf( __( '%d Transients Rows Cleared', 'woocommerce' ), $rows + $rows2 ) . '</p></div>';
echo '<div class="updated inline"><p>' . sprintf( __( '%d Transients Rows Cleared', 'woocommerce' ), $rows + $rows2 ) . '</p></div>';
break;
case 'reset_roles' :
// Remove then re-add caps and roles
WC_Install::remove_roles();
WC_Install::create_roles();
echo '<div class="updated"><p>' . __( 'Roles successfully reset', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Roles successfully reset', 'woocommerce' ) . '</p></div>';
break;
case 'recount_terms' :
@ -92,7 +91,7 @@ class WC_Admin_Status {
_wc_term_recount( $product_tags, get_taxonomy( 'product_tag' ), true, false );
echo '<div class="updated"><p>' . __( 'Terms successfully recounted', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Terms successfully recounted', 'woocommerce' ) . '</p></div>';
break;
case 'clear_sessions' :
@ -100,11 +99,11 @@ class WC_Admin_Status {
wp_cache_flush();
echo '<div class="updated"><p>' . __( 'Sessions successfully cleared', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Sessions successfully cleared', 'woocommerce' ) . '</p></div>';
break;
case 'install_pages' :
WC_Install::create_pages();
echo '<div class="updated"><p>' . __( 'All missing WooCommerce pages was installed successfully.', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'All missing WooCommerce pages was installed successfully.', 'woocommerce' ) . '</p></div>';
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 '<div class="updated"><p>' . __( 'Tax rates successfully deleted', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Tax rates successfully deleted', 'woocommerce' ) . '</p></div>';
break;
case 'reset_tracking' :
delete_option( 'woocommerce_allow_tracking' );
WC_Admin_Notices::add_notice( 'tracking' );
echo '<div class="updated"><p>' . __( 'Usage tracking settings successfully reset.', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Usage tracking settings successfully reset.', 'woocommerce' ) . '</p></div>';
break;
default :
$action = esc_attr( $_GET['action'] );
@ -127,10 +126,9 @@ class WC_Admin_Status {
$return = call_user_func( $callback );
if ( $return === false ) {
if ( is_array( $callback ) ) {
echo '<div class="error"><p>' . sprintf( __( 'There was an error calling %s::%s', 'woocommerce' ), get_class( $callback[0] ), $callback[1] ) . '</p></div>';
echo '<div class="error inline"><p>' . sprintf( __( 'There was an error calling %s::%s', 'woocommerce' ), get_class( $callback[0] ), $callback[1] ) . '</p></div>';
} else {
echo '<div class="error"><p>' . sprintf( __( 'There was an error calling %s', 'woocommerce' ), $callback ) . '</p></div>';
echo '<div class="error inline"><p>' . sprintf( __( 'There was an error calling %s', 'woocommerce' ), $callback ) . '</p></div>';
}
}
}
@ -140,7 +138,7 @@ class WC_Admin_Status {
// Display message if settings settings have been saved
if ( isset( $_REQUEST['settings-updated'] ) ) {
echo '<div class="updated"><p>' . __( 'Your changes have been saved.', 'woocommerce' ) . '</p></div>';
echo '<div class="updated inline"><p>' . __( 'Your changes have been saved.', 'woocommerce' ) . '</p></div>';
}
include_once( 'views/html-admin-page-status-tools.php' );

View File

@ -166,7 +166,7 @@ class WC_Tax_Rate_Importer extends WP_Importer {
}
// Show Result
echo '<div class="updated settings-error below-h2"><p>
echo '<div class="updated settings-error"><p>
' . sprintf( __( 'Import complete - imported <strong>%s</strong> tax rates.', 'woocommerce' ), $loop ) . '
</p></div>';

View File

@ -8,6 +8,7 @@
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="wrap woocommerce wc_addons_wrap">
<div class="icon32 icon32-posts-product" id="icon-woocommerce"><br /></div>

View File

@ -4,27 +4,24 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
?>
<div class="wrap woocommerce">
<div class="icon32 icon32-woocommerce-reports" id="icon-woocommerce"><br /></div>
<h1><?php echo sprintf( esc_html__( '%s Report' ), $reports[ $current_tab ]['title'] ); ?></h1>
<p class="nav-tab-wrapper woo-nav-tab-wrapper">
<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php
foreach ( $reports as $key => $report_group ) {
echo '<a href="'.admin_url( 'admin.php?page=wc-reports&tab=' . urlencode( $key ) ).'" class="nav-tab ';
if ( $current_tab == $key ) echo 'nav-tab-active';
echo '">' . esc_html( $report_group[ 'title' ] ) . '</a>';
}
?>
<?php do_action('wc_reports_tabs'); ?>
</p>
do_action( 'wc_reports_tabs' );
?>
</h2>
<?php if ( sizeof( $reports[ $current_tab ]['reports'] ) > 1 ) {
?>
<ul class="subsubsub">

View File

@ -8,7 +8,6 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<?php if ( $logs ) : ?>
<div id="log-viewer-select">
<div class="alignleft">
@ -30,5 +29,5 @@ if ( ! defined( 'ABSPATH' ) ) {
<textarea cols="70" rows="25"><?php echo esc_textarea( file_get_contents( WC_LOG_DIR . $viewed_log ) ); ?></textarea>
</div>
<?php else : ?>
<div class="updated woocommerce-message below-h2"><p><?php _e( 'There are currently no logs to view.', 'woocommerce' ); ?></p></div>
<div class="updated woocommerce-message inline"><p><?php _e( 'There are currently no logs to view.', 'woocommerce' ); ?></p></div>
<?php endif; ?>

View File

@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<div class="updated woocommerce-message">
<div class="updated woocommerce-message inline">
<p><?php _e( 'Please copy and paste this information in your ticket when contacting support:', 'woocommerce' ); ?> </p>
<p class="submit"><a href="#" class="button-primary debug-report"><?php _e( 'Get System Report', 'woocommerce' ); ?></a>
<a class="button-secondary docs" href="http://docs.woothemes.com/document/understanding-the-woocommerce-system-status-report/" target="_blank"><?php _e( 'Understanding the Status Report', 'woocommerce' ); ?></a></p>

View File

@ -8,7 +8,6 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<form method="post" action="options.php">
<?php settings_fields( 'woocommerce_status_settings_fields' ); ?>
<?php $options = wp_parse_args( get_option( 'woocommerce_status_options', array() ), array( 'uninstall_data' => 0, 'template_debug_mode' => 0, 'shipping_debug_mode' => 0 ) ); ?>

View File

@ -13,13 +13,12 @@ $tabs = array(
'tools' => __( 'Tools', 'woocommerce' ),
'logs' => __( 'Logs', 'woocommerce' ),
);
?>
<div class="wrap woocommerce">
<div class="icon32 icon32-woocommerce-status" id="icon-woocommerce"><br /></div>
<h1><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
<p class="nav-tab-wrapper woo-nav-tab-wrapper">
<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php
foreach ( $tabs as $name => $label ) {
echo '<a href="' . admin_url( 'admin.php?page=wc-status&tab=' . $name ) . '" class="nav-tab ';
@ -27,7 +26,7 @@ $tabs = array(
echo '">' . $label . '</a>';
}
?>
</p>
</h2>
<?php
switch ( $current_tab ) {
case "tools" :

View File

@ -5,13 +5,13 @@
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="wrap woocommerce">
<form method="<?php echo esc_attr( apply_filters( 'woocommerce_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data">
<div class="icon32 icon32-woocommerce-settings" id="icon-woocommerce"><br /></div>
<h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
<p class="nav-tab-wrapper woo-nav-tab-wrapper">
<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php
foreach ( $tabs as $name => $label ) {
echo '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=' . $name ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . $label . '</a>';
@ -19,8 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
do_action( 'woocommerce_settings_tabs' );
?>
</p>
</h2>
<?php
do_action( 'woocommerce_sections_' . $current_tab );
@ -29,7 +28,6 @@ if ( ! defined( 'ABSPATH' ) ) {
do_action( 'woocommerce_settings_' . $current_tab );
do_action( 'woocommerce_settings_tabs_' . $current_tab ); // @deprecated hook
?>
<p class="submit">
<?php if ( ! isset( $GLOBALS['hide_save_button'] ) ) : ?>
<input name="save" class="button-primary" type="submit" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>" />