Fix hierarchy on settings screens.

This commit is contained in:
Justin Shreve 2016-02-17 10:01:20 -08:00
parent 6d683b7492
commit 608f651133
7 changed files with 12 additions and 10 deletions

View File

@ -59,7 +59,7 @@ class WC_Admin_API_Keys {
* Table list output. * Table list output.
*/ */
private static function table_list_output() { private static function table_list_output() {
echo '<h3>' . __( 'Keys/Apps', 'woocommerce' ) . ' <a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=api&section=keys&create-key=1' ) ) . '" class="add-new-h2">' . __( 'Add Key', 'woocommerce' ) . '</a></h3>'; echo '<h2>' . __( 'Keys/Apps', 'woocommerce' ) . ' <a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=api&section=keys&create-key=1' ) ) . '" class="add-new-h2">' . __( 'Add Key', 'woocommerce' ) . '</a></h2>';
$keys_table_list = new WC_Admin_API_Keys_Table_List(); $keys_table_list = new WC_Admin_API_Keys_Table_List();
$keys_table_list->prepare_items(); $keys_table_list->prepare_items();

View File

@ -265,7 +265,7 @@ class WC_Admin_Settings {
// Section Titles // Section Titles
case 'title': case 'title':
if ( ! empty( $value['title'] ) ) { if ( ! empty( $value['title'] ) ) {
echo '<h3>' . esc_html( $value['title'] ) . '</h3>'; echo '<h2>' . esc_html( $value['title'] ) . '</h2>';
} }
if ( ! empty( $value['desc'] ) ) { if ( ! empty( $value['desc'] ) ) {
echo wpautop( wptexturize( wp_kses_post( $value['desc'] ) ) ); echo wpautop( wptexturize( wp_kses_post( $value['desc'] ) ) );

View File

@ -400,7 +400,7 @@ class WC_Admin_Webhooks {
* Table list output. * Table list output.
*/ */
private static function table_list_output() { private static function table_list_output() {
echo '<h3>' . __( 'Webhooks', 'woocommerce' ) . ' <a href="' . esc_url( wp_nonce_url( admin_url( 'admin.php?page=wc-settings&tab=api&section=webhooks&create-webhook=1' ), 'create-webhook' ) ) . '" class="add-new-h2">' . __( 'Add Webhook', 'woocommerce' ) . '</a></h3>'; echo '<h2>' . __( 'Webhooks', 'woocommerce' ) . ' <a href="' . esc_url( wp_nonce_url( admin_url( 'admin.php?page=wc-settings&tab=api&section=webhooks&create-webhook=1' ), 'create-webhook' ) ) . '" class="add-new-h2">' . __( 'Add Webhook', 'woocommerce' ) . '</a></h2>';
$webhooks_table_list = new WC_Admin_Webhooks_Table_List(); $webhooks_table_list = new WC_Admin_Webhooks_Table_List();
$webhooks_table_list->prepare_items(); $webhooks_table_list->prepare_items();

View File

@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
?> ?>
<div id="key-fields" class="settings-panel"> <div id="key-fields" class="settings-panel">
<h3><?php _e( 'Key Details', 'woocommerce' ); ?></h3> <h2><?php _e( 'Key Details', 'woocommerce' ); ?></h2>
<input type="hidden" id="key_id" value="<?php echo esc_attr( $key_id ); ?>" /> <input type="hidden" id="key_id" value="<?php echo esc_attr( $key_id ); ?>" />

View File

@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<input type="hidden" name="webhook_id" value="<?php echo esc_attr( $webhook->id ); ?>" /> <input type="hidden" name="webhook_id" value="<?php echo esc_attr( $webhook->id ); ?>" />
<div id="webhook-options" class="settings-panel"> <div id="webhook-options" class="settings-panel">
<h3><?php _e( 'Webhook Data', 'woocommerce' ); ?></h3> <h2><?php _e( 'Webhook Data', 'woocommerce' ); ?></h2>
<table class="form-table"> <table class="form-table">
<tbody> <tbody>
<tr valign="top"> <tr valign="top">
@ -113,7 +113,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</div> </div>
<div id="webhook-actions" class="settings-panel"> <div id="webhook-actions" class="settings-panel">
<h3><?php _e( 'Webhook Actions', 'woocommerce' ); ?></h3> <h2><?php _e( 'Webhook Actions', 'woocommerce' ); ?></h2>
<table class="form-table"> <table class="form-table">
<tbody> <tbody>
<?php if ( '0000-00-00 00:00:00' != $webhook->post_data->post_modified_gmt ) : ?> <?php if ( '0000-00-00 00:00:00' != $webhook->post_data->post_modified_gmt ) : ?>
@ -160,7 +160,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</div> </div>
<div id="webhook-logs" class="settings-panel"> <div id="webhook-logs" class="settings-panel">
<h3><?php _e( 'Webhook Logs', 'woocommerce' ); ?></h3> <h2><?php _e( 'Webhook Logs', 'woocommerce' ); ?></h2>
<?php WC_Admin_Webhooks::logs_output( $webhook ); ?> <?php WC_Admin_Webhooks::logs_output( $webhook ); ?>
</div> </div>

View File

@ -9,7 +9,9 @@ if ( ! defined( 'ABSPATH' ) ) {
<div class="wrap woocommerce"> <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"> <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> <div class="icon32 icon32-woocommerce-settings" id="icon-woocommerce"><br /></div>
<h2 class="nav-tab-wrapper woo-nav-tab-wrapper"> <h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
<p class="nav-tab-wrapper woo-nav-tab-wrapper">
<?php <?php
foreach ( $tabs as $name => $label ) { 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>'; echo '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=' . $name ) . '" class="nav-tab ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . $label . '</a>';
@ -17,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
do_action( 'woocommerce_settings_tabs' ); do_action( 'woocommerce_settings_tabs' );
?> ?>
</h2> </p>
<?php <?php
do_action( 'woocommerce_sections_' . $current_tab ); do_action( 'woocommerce_sections_' . $current_tab );

View File

@ -704,7 +704,7 @@ class WC_Email extends WC_Settings_API {
// Do admin actions. // Do admin actions.
$this->admin_actions(); $this->admin_actions();
?> ?>
<h3><?php echo esc_html( $this->get_title() ); ?></h3> <h2><?php echo esc_html( $this->get_title() ); ?></h2>
<?php echo wpautop( wp_kses_post( $this->get_description() ) ); ?> <?php echo wpautop( wp_kses_post( $this->get_description() ) ); ?>
<?php <?php