Administration: Improve the usage of the button CSS classes.

Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

Built from https://develop.svn.wordpress.org/trunk@38672


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-09-28 19:54:28 +00:00
parent 232be98c0e
commit eeefec932f
66 changed files with 141 additions and 140 deletions

View File

@ -1204,7 +1204,7 @@ body.cheatin p {
* Widgets and Menus common styles
*/
/* higher specificity than .wp-core-ui .button-secondary */
/* higher specificity than .wp-core-ui .button */
#customize-theme-controls .add-new-widget,
#customize-theme-controls .add-new-menu-item {
cursor: pointer;

View File

@ -1204,7 +1204,7 @@ body.cheatin p {
* Widgets and Menus common styles
*/
/* higher specificity than .wp-core-ui .button-secondary */
/* higher specificity than .wp-core-ui .button */
#customize-theme-controls .add-new-widget,
#customize-theme-controls .add-new-menu-item {
cursor: pointer;

View File

@ -221,8 +221,7 @@ table.fixed td {
}
#wpbody-content input.button,
#wpbody-content input.button-primary,
#wpbody-content input.button-secondary {
#wpbody-content input.button-primary {
overflow: visible;
}
@ -447,8 +446,8 @@ div#dashboard-widgets {
display: block;
}
.tablenav .button-secondary,
.nav .button-secondary {
.tablenav .button,
.nav .button {
padding-top: 2px;
padding-bottom: 2px;
}
@ -507,7 +506,7 @@ table.ie-fixed {
border-collapse: collapse;
}
.tablenav a.button-secondary {
.tablenav a.button {
display: inline-block;
padding: 2px 5px;
}

File diff suppressed because one or more lines are too long

View File

@ -221,8 +221,7 @@ table.fixed td {
}
#wpbody-content input.button,
#wpbody-content input.button-primary,
#wpbody-content input.button-secondary {
#wpbody-content input.button-primary {
overflow: visible;
}
@ -447,8 +446,8 @@ div#dashboard-widgets {
display: block;
}
.tablenav .button-secondary,
.nav .button-secondary {
.tablenav .button,
.nav .button {
padding-top: 2px;
padding-bottom: 2px;
}
@ -507,7 +506,7 @@ table.ie-fixed {
border-collapse: collapse;
}
.tablenav a.button-secondary {
.tablenav a.button {
display: inline-block;
padding: 2px 5px;
}

File diff suppressed because one or more lines are too long

View File

@ -443,7 +443,7 @@ body.language-chooser {
margin-left: 15px;
}
.button-secondary.hide-if-no-js,
.button.hide-if-no-js,
.hide-if-no-js {
display: none;
}

File diff suppressed because one or more lines are too long

View File

@ -443,7 +443,7 @@ body.language-chooser {
margin-right: 15px;
}
.button-secondary.hide-if-no-js,
.button.hide-if-no-js,
.hide-if-no-js {
display: none;
}

File diff suppressed because one or more lines are too long

View File

@ -656,6 +656,7 @@ th.asc a:focus span.sorting-indicator {
margin-right: 2px;
}
.tablenav a.button,
.tablenav a.button-secondary {
display: block;
margin: 3px 0 0 8px;

File diff suppressed because one or more lines are too long

View File

@ -656,6 +656,7 @@ th.asc a:focus span.sorting-indicator {
margin-left: 2px;
}
.tablenav a.button,
.tablenav a.button-secondary {
display: block;
margin: 3px 8px 0 0;

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,7 @@
margin-left: 3px;
}
.theme-browser .theme .theme-actions .button-secondary {
.theme-browser .theme .theme-actions .button {
float: none;
margin-right: 3px;
}

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,7 @@
margin-right: 3px;
}
.theme-browser .theme .theme-actions .button-secondary {
.theme-browser .theme .theme-actions .button {
float: none;
margin-left: 3px;
}

File diff suppressed because one or more lines are too long

View File

@ -242,7 +242,7 @@ class Custom_Background {
<td>
<form method="post">
<?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
<?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/>
<?php submit_button( __( 'Remove Background Image' ), '', 'remove-background', false ); ?><br/>
<?php _e('This will remove the background image. You will not be able to restore any customizations.') ?>
</form>
</td>
@ -256,7 +256,7 @@ class Custom_Background {
<td>
<form method="post">
<?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
<?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/>
<?php submit_button( __( 'Restore Original Image' ), '', 'reset-background', false ); ?><br/>
<?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?>
</form>
</td>
@ -272,7 +272,7 @@ class Custom_Background {
<input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
<?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
</p>
<p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />

View File

@ -576,7 +576,7 @@ class Custom_Image_Header {
<input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
<?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
</p>
<?php
$modal_update_href = esc_url( add_query_arg( array(
@ -634,7 +634,7 @@ class Custom_Image_Header {
<th scope="row"><?php _e( 'Remove Image' ); ?></th>
<td>
<p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ) ?></p>
<?php submit_button( __( 'Remove Header Image' ), 'button', 'removeheader', false ); ?>
<?php submit_button( __( 'Remove Header Image' ), '', 'removeheader', false ); ?>
</td>
</tr>
<?php endif;
@ -645,7 +645,7 @@ class Custom_Image_Header {
<th scope="row"><?php _e( 'Reset Image' ); ?></th>
<td>
<p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ) ?></p>
<?php submit_button( __( 'Restore Original Header Image' ), 'button', 'resetheader', false ); ?>
<?php submit_button( __( 'Restore Original Header Image' ), '', 'resetheader', false ); ?>
</td>
</tr>
<?php endif; ?>
@ -823,7 +823,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
<?php
if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
submit_button( __( 'Skip Cropping, Publish Image as Is' ), 'secondary', 'skip-cropping', false );
submit_button( __( 'Skip Cropping, Publish Image as Is' ), '', 'skip-cropping', false );
?>
</p>
</form>

View File

@ -168,7 +168,7 @@ do_action( 'customize_controls_print_scripts' );
<?php endforeach; ?>
</div>
<?php endif; ?>
<button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
<button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
<span class="collapse-sidebar-arrow"></span>
<span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
</button>

View File

@ -351,7 +351,7 @@ class WP_Comments_List_Table extends WP_List_Table {
* @since 3.5.0
*/
do_action( 'restrict_manage_comments' );
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
}
if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) ) {

View File

@ -112,7 +112,7 @@ class WP_Links_List_Table extends WP_List_Table {
echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
wp_dropdown_categories( $dropdown_options );
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
?>
</div>
<?php

View File

@ -361,7 +361,7 @@ class WP_List_Table {
<p class="search-box">
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
<?php submit_button( $text, 'button', '', false, array( 'id' => 'search-submit' ) ); ?>
<?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
</p>
<?php
}

View File

@ -174,7 +174,7 @@ class WP_Media_List_Table extends WP_List_Table {
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
do_action( 'restrict_manage_posts', $this->screen->post_type );
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
}
if ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {

View File

@ -488,7 +488,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
}
$action_links[] = sprintf(
'<a href="%1$s" class="button activate-now button-secondary" aria-label="%2$s">%3$s</a>',
'<a href="%1$s" class="button activate-now" aria-label="%2$s">%3$s</a>',
esc_url( $activate_url ),
esc_attr( sprintf( $button_label, $plugin['name'] ) ),
$button_text

View File

@ -367,7 +367,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
<p class="search-box">
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wp-filter-search" name="s" value="<?php _admin_search_query(); ?>" placeholder="<?php esc_attr_e( 'Search installed plugins...' ); ?>"/>
<?php submit_button( $text, 'button hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
<?php submit_button( $text, 'hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
</p>
<?php
}
@ -496,7 +496,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
echo '<div class="alignleft actions">';
if ( 'recently_activated' == $status ) {
submit_button( __( 'Clear List' ), 'button', 'clear-recent-list', false );
submit_button( __( 'Clear List' ), '', 'clear-recent-list', false );
} elseif ( 'top' === $which && 'mustuse' === $status ) {
/* translators: %s: mu-plugins directory name */
echo '<p>' . sprintf( __( 'Files in the %s directory are executed automatically.' ),

View File

@ -479,7 +479,7 @@ class WP_Posts_List_Table extends WP_List_Table {
*/
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
}
if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) {
@ -1713,14 +1713,14 @@ class WP_Posts_List_Table extends WP_List_Table {
}
?>
<p class="submit inline-edit-save">
<button type="button" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></button>
<button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
<?php if ( ! $bulk ) {
wp_nonce_field( 'inlineeditnonce', '_inline_edit', false );
?>
<button type="button" class="button-primary save alignright"><?php _e( 'Update' ); ?></button>
<button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
<span class="spinner"></span>
<?php } else {
submit_button( __( 'Update' ), 'button-primary alignright', 'bulk_edit', false );
submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
} ?>
<input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
<input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />

View File

@ -619,8 +619,8 @@ class WP_Terms_List_Table extends WP_List_Table {
?>
<p class="inline-edit-save submit">
<button type="button" class="cancel button-secondary alignleft"><?php _e( 'Cancel' ); ?></button>
<button type="button" class="save button-primary alignright"><?php echo $tax->labels->update_item; ?></button>
<button type="button" class="cancel button alignleft"><?php _e( 'Cancel' ); ?></button>
<button type="button" class="save button button-primary alignright"><?php echo $tax->labels->update_item; ?></button>
<span class="spinner"></span>
<span class="error" style="display:none;"></span>
<?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?>

View File

@ -329,14 +329,14 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
<div id="theme-installer" class="wp-full-overlay expanded">
<div class="wp-full-overlay-sidebar">
<div class="wp-full-overlay-header">
<a href="#" class="close-full-overlay button-secondary"><?php _e( 'Close' ); ?></a>
<a href="#" class="close-full-overlay button"><?php _e( 'Close' ); ?></a>
<span class="theme-install"></span>
</div>
<div class="wp-full-overlay-sidebar-content">
<div class="install-theme-info"></div>
</div>
<div class="wp-full-overlay-footer">
<button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
<button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
<span class="collapse-sidebar-arrow"></span>
<span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
</button>
@ -398,7 +398,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
<div class="install-theme-info"><?php
switch ( $status ) {
case 'update_available':
echo '<a class="theme-install button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
break;
case 'newer_installed':
case 'latest_installed':
@ -406,7 +406,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
break;
case 'install':
default:
echo '<a class="theme-install button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
break;
} ?>
<h3 class="theme-name"><?php echo $name; ?></h3>

View File

@ -267,7 +267,7 @@ class WP_Users_List_Table extends WP_List_Table {
<?php wp_dropdown_roles(); ?>
</select>
<?php
submit_button( __( 'Change' ), 'button', 'changeit', false );
submit_button( __( 'Change' ), '', 'changeit', false );
endif;
/**

View File

@ -427,7 +427,7 @@ function wp_network_dashboard_right_now() {
<p>
<label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
<input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
<?php submit_button( __( 'Search Users' ), 'button', false, false, array( 'id' => 'submit_users' ) ); ?>
<?php submit_button( __( 'Search Users' ), '', false, false, array( 'id' => 'submit_users' ) ); ?>
</p>
</form>
@ -435,7 +435,7 @@ function wp_network_dashboard_right_now() {
<p>
<label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
<input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
<?php submit_button( __( 'Search Sites' ), 'button', false, false, array( 'id' => 'submit_sites' ) ); ?>
<?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
</p>
</form>
<?php

View File

@ -1261,7 +1261,7 @@ foreach ( (array) $extra_fields as $field ) {
?>
<p class="request-filesystem-credentials-action-buttons">
<button class="button cancel-button" data-js-action="close" type="button"><?php _e( 'Cancel' ); ?></button>
<?php submit_button( __( 'Proceed' ), 'button', 'upgrade', false ); ?>
<?php submit_button( __( 'Proceed' ), '', 'upgrade', false ); ?>
</p>
</div>
</form>

View File

@ -1480,7 +1480,7 @@ function get_media_item( $attachment_id, $args = null ) {
);
if ( $r['send'] ) {
$r['send'] = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false );
$r['send'] = get_submit_button( __( 'Insert into Post' ), '', "send[$attachment_id]", false );
}
$delete = empty( $r['delete'] ) ? '' : $r['delete'];
@ -2031,7 +2031,7 @@ if ( $id ) {
?></div>
<p class="savebutton ml-submit">
<?php submit_button( __( 'Save all changes' ), 'button', 'save', false ); ?>
<?php submit_button( __( 'Save all changes' ), '', 'save', false ); ?>
</p>
</form>
<?php
@ -2242,7 +2242,7 @@ jQuery(function($){
</div>
<p class="ml-submit">
<?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?>
<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false, array( 'id' => 'save-all', 'style' => 'display: none;' ) ); ?>
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
<input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" />
<input type="hidden" name="tab" value="<?php echo esc_attr( $GLOBALS['tab'] ); ?>" />
@ -2382,7 +2382,7 @@ function media_upload_library_form($errors) {
<p id="media-search" class="search-box">
<label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label>
<input type="search" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
<?php submit_button( __( 'Search Media' ), 'button', '', false ); ?>
<?php submit_button( __( 'Search Media' ), '', '', false ); ?>
</p>
<ul class="subsubsub">
@ -2479,7 +2479,7 @@ foreach ($arc_result as $arc_row) {
</select>
<?php } ?>
<?php submit_button( __( 'Filter &#187;' ), 'button', 'post-query-submit', false ); ?>
<?php submit_button( __( 'Filter &#187;' ), '', 'post-query-submit', false ); ?>
</div>
@ -2509,7 +2509,7 @@ jQuery(function($){
<?php echo get_media_items(null, $errors); ?>
</div>
<p class="ml-submit">
<?php submit_button( __( 'Save all changes' ), 'button savebutton', 'save', false ); ?>
<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false ); ?>
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
</p>
</form>
@ -2612,7 +2612,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) {
<tr class="not-image">
<td></td>
<td>
' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . '
' . get_submit_button( __( 'Insert into Post' ), '', 'insertonlybutton', false ) . '
</td>
</tr>
</tbody></table>

View File

@ -32,7 +32,7 @@ function post_submit_meta_box( $post, $args = array() ) {
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
<div style="display:none;">
<?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
</div>
<div id="minor-publishing-actions">
@ -290,7 +290,7 @@ function attachment_submit_meta_box( $post ) {
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
<div style="display:none;">
<?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
</div>
@ -875,7 +875,7 @@ function link_submit_meta_box($link) {
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
<div style="display:none;">
<?php submit_button( __( 'Save' ), 'button', 'save', false ); ?>
<?php submit_button( __( 'Save' ), '', 'save', false ); ?>
</div>
<div id="minor-publishing-actions">

View File

@ -284,7 +284,7 @@ function wp_nav_menu_item_link_meta_box() {
<p class="button-controls wp-clearfix">
<span class="add-to-menu">
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
<span class="spinner"></span>
</span>
</p>
@ -450,7 +450,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
<label for="quick-search-posttype-<?php echo $post_type_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
<input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" id="quick-search-posttype-<?php echo $post_type_name; ?>" />
<span class="spinner"></span>
<?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
<?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
</p>
<ul id="<?php echo $post_type_name; ?>-search-checklist" data-wp-lists="list:<?php echo $post_type_name?>" class="categorychecklist form-no-clear">
@ -572,7 +572,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
</span>
<span class="add-to-menu">
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>" />
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>" />
<span class="spinner"></span>
</span>
</p>
@ -739,7 +739,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
<label for="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
<input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" id="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
<span class="spinner"></span>
<?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
<?php submit_button( __( 'Search' ), 'small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
</p>
<ul id="<?php echo $taxonomy_name; ?>-search-checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear">
@ -770,7 +770,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
</span>
<span class="add-to-menu">
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>" />
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>" />
<span class="spinner"></span>
</span>
</p>

View File

@ -265,7 +265,7 @@ function install_search_form( $deprecated = true ) {
<label><span class="screen-reader-text"><?php _e( 'Search Plugins' ); ?></span>
<input type="search" name="s" value="<?php echo esc_attr( $term ) ?>" class="wp-filter-search" placeholder="<?php esc_attr_e( 'Search Plugins' ); ?>" />
</label>
<?php submit_button( __( 'Search Plugins' ), 'button hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
<?php submit_button( __( 'Search Plugins' ), 'hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
</form><?php
}
@ -281,7 +281,7 @@ function install_plugins_upload() {
<?php wp_nonce_field( 'plugin-upload' ); ?>
<label class="screen-reader-text" for="pluginzip"><?php _e( 'Plugin zip file' ); ?></label>
<input type="file" id="pluginzip" name="pluginzip" />
<?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?>
<?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
</form>
</div>
<?php

View File

@ -423,11 +423,11 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
</div>
<p id="replysubmit" class="submit">
<a href="#comments-form" class="save button-primary alignright">
<a href="#comments-form" class="save button button-primary alignright">
<span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
<span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
<span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
<a href="#comments-form" class="cancel button-secondary alignleft"><?php _e('Cancel'); ?></a>
<a href="#comments-form" class="cancel button alignleft"><?php _e('Cancel'); ?></a>
<span class="waiting spinner"></span>
<span class="error" style="display:none;"></span>
</p>
@ -657,7 +657,7 @@ function meta_form( $post = null ) {
<tr><td colspan="2">
<div class="submit">
<?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
<?php submit_button( __( 'Add Custom Field' ), '', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
</div>
<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
</td></tr>
@ -1513,7 +1513,7 @@ function find_posts_div($found_action = '') {
<div id="find-posts-response"></div>
</div>
<div class="find-box-buttons">
<?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>
<?php submit_button( __( 'Select' ), 'primary alignright', 'find-posts-submit', false ); ?>
<div class="clear"></div>
</div>
</div>
@ -1914,10 +1914,11 @@ function get_submit_button( $text = '', $type = 'primary large', $name = 'submit
continue;
$classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t;
}
$class = implode( ' ', array_unique( $classes ) );
// Remove empty items, remove duplicate items, and finally build a string.
$class = implode( ' ', array_unique( array_filter( $classes ) ) );
if ( 'delete' === $type )
$class = 'button-secondary delete';
$class = 'button delete';
$text = $text ? $text : __( 'Save Changes' );

View File

@ -85,7 +85,7 @@ function install_theme_search_form( $type_selector = true ) {
<label class="screen-reader-text" for="s"><?php _e('Search by keyword'); ?></label>
<?php endif; ?>
<input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
<?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
<?php submit_button( __( 'Search' ), '', 'search', false ); ?>
</form>
<?php
}
@ -130,7 +130,7 @@ function install_themes_dashboard() {
</div>
<br class="clear" />
<?php submit_button( __( 'Find Themes' ), 'button', 'search' ); ?>
<?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
</form>
<?php
}
@ -145,7 +145,7 @@ function install_themes_upload() {
<?php wp_nonce_field( 'theme-upload' ); ?>
<label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label>
<input type="file" id="themezip" name="themezip" />
<?php submit_button( __( 'Install Now' ), 'button', 'install-theme-submit', false ); ?>
<?php submit_button( __( 'Install Now' ), '', 'install-theme-submit', false ); ?>
</form>
<?php
}

View File

@ -254,7 +254,7 @@ function wp_widget_control( $sidebar_args ) {
<a class="widget-control-close" href="#close"><?php _e('Close'); ?></a>
</div>
<div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
<?php submit_button( __( 'Save' ), 'button-primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
<?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
<span class="spinner"></span>
</div>
<br class="clear" />
@ -278,4 +278,4 @@ function wp_widget_control( $sidebar_args ) {
*/
function wp_widgets_access_body_class($classes) {
return "$classes widgets_access ";
}
}

View File

@ -141,7 +141,7 @@ function display_setup_form( $error = null ) {
<div class="">
<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden"></span>
<span class="text"><?php _e( 'Hide' ); ?></span>
</button>

View File

@ -835,7 +835,7 @@
$saveBtn = this.container.find( '.widget-control-save' );
$saveBtn.val( l10n.saveBtnLabel );
$saveBtn.attr( 'title', l10n.saveBtnTooltip );
$saveBtn.removeClass( 'button-primary' ).addClass( 'button-secondary' );
$saveBtn.removeClass( 'button-primary' );
$saveBtn.on( 'click', function( e ) {
e.preventDefault();
self.updateWidget( { disable_form: true } ); // @todo disable_form is unused?

File diff suppressed because one or more lines are too long

View File

@ -1105,7 +1105,7 @@
$message.siblings( '.preview' ).replaceWith( function () {
return $( '<a>' )
.attr( 'href', response.customizeUrl )
.addClass( 'button button-secondary load-customize' )
.addClass( 'button load-customize' )
.text( wp.updates.l10n.livePreview );
} );
}

File diff suppressed because one or more lines are too long

View File

@ -354,12 +354,12 @@ wpWidgets = {
if ( $target.hasClass('button-primary') ) {
self.addWidget( chooser );
self.closeChooser();
} else if ( $target.hasClass('button-secondary') ) {
} else if ( $target.hasClass( 'widgets-chooser-cancel' ) ) {
self.closeChooser();
}
}).on( 'keyup.widgets-chooser', function( event ) {
if ( event.which === $.ui.keyCode.ENTER ) {
if ( $( event.target ).hasClass('button-secondary') ) {
if ( $( event.target ).hasClass( 'widgets-chooser-cancel' ) ) {
// Close instead of adding when pressing Enter on the Cancel button
self.closeChooser();
} else {

File diff suppressed because one or more lines are too long

View File

@ -713,7 +713,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
</option>
<?php endforeach; ?>
</select>
<span class="submit-btn"><input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Select' ); ?>"></span>
<span class="submit-btn"><input type="submit" class="button" value="<?php esc_attr_e( 'Select' ); ?>"></span>
<span class="add-new-menu-action">
<?php printf( __( 'or <a href="%s">create a new menu</a>.' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0 ), admin_url( 'nav-menus.php' ) ) ) ); ?>
</span><!-- /add-new-menu-action -->

View File

@ -158,9 +158,9 @@ if ( $action ) {
wp_nonce_field( 'bulk-themes' );
if ( 1 == $themes_to_delete ) {
submit_button( __( 'Yes, delete this theme' ), 'button', 'submit', false );
submit_button( __( 'Yes, delete this theme' ), '', 'submit', false );
} else {
submit_button( __( 'Yes, delete these themes' ), 'button', 'submit', false );
submit_button( __( 'Yes, delete these themes' ), '', 'submit', false );
}
?>
</form>
@ -168,7 +168,7 @@ if ( $action ) {
$referer = wp_get_referer();
?>
<form method="post" action="<?php echo $referer ? esc_url( $referer ) : ''; ?>" style="display:inline;">
<?php submit_button( __( 'No, return me to the theme list' ), 'button', 'submit', false ); ?>
<?php submit_button( __( 'No, return me to the theme list' ), '', 'submit', false ); ?>
</form>
</div>
<?php

View File

@ -224,7 +224,7 @@ default:
}
?>
</select>
<?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
<?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
</form>
</div>
<br class="clear" />

View File

@ -327,13 +327,13 @@ if ( $action ) {
}
?>
<?php wp_nonce_field('bulk-plugins') ?>
<?php submit_button( $data_to_delete ? __( 'Yes, delete these files and data' ) : __( 'Yes, delete these files' ), 'button', 'submit', false ); ?>
<?php submit_button( $data_to_delete ? __( 'Yes, delete these files and data' ) : __( 'Yes, delete these files' ), '', 'submit', false ); ?>
</form>
<?php
$referer = wp_get_referer();
?>
<form method="post" action="<?php echo $referer ? esc_url( $referer ) : ''; ?>" style="display:inline;">
<?php submit_button( __( 'No, return me to the plugin list' ), 'button', 'submit', false ); ?>
<?php submit_button( __( 'No, return me to the plugin list' ), '', 'submit', false ); ?>
</form>
</div>
<?php

View File

@ -182,7 +182,7 @@ foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_them
}
?>
</select>
<?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
<?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
</form>
</div>
<br class="clear" />

View File

@ -174,7 +174,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
<label for="wporg-username-input"><?php _e( 'Your WordPress.org username:' ); ?></label>
<input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" />
<input type="search" id="wporg-username-input" value="<?php echo esc_attr( $user ); ?>" />
<input type="button" class="button button-secondary favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
<input type="button" class="button favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
</p>
</div>
@ -262,9 +262,9 @@ if ( $tab ) {
<a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<# } #>
<# if ( data.customize_url ) { #>
<a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
<a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
<# } else { #>
<button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<# } #>
<# } else { #>
<?php
@ -272,7 +272,7 @@ if ( $tab ) {
$aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
?>
<a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
<button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<# } #>
</div>
@ -325,7 +325,7 @@ if ( $tab ) {
</div>
</div>
<div class="wp-full-overlay-footer">
<button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
<button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
<span class="collapse-sidebar-arrow"></span>
<span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
</button>

View File

@ -200,17 +200,17 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
$current_theme_actions[] = "<a class='button button-secondary$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
$current_theme_actions[] = "<a class='button$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
else
$current_theme_actions[] = "<a class='button button-secondary$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
$current_theme_actions[] = "<a class='button$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
$menu_file = $item[2];
if ( current_user_can( 'customize' ) ) {
if ( 'custom-header' === $menu_file ) {
$current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
$current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
} elseif ( 'custom-background' === $menu_file ) {
$current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
$current_theme_actions[] = "<a class='button hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
}
}
@ -219,9 +219,9 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
}
if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
$current_theme_actions[] = "<a class='button button-secondary$class' href='{$item[2]}'>{$item[0]}</a>";
$current_theme_actions[] = "<a class='button$class' href='{$item[2]}'>{$item[0]}</a>";
} else {
$current_theme_actions[] = "<a class='button button-secondary$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
$current_theme_actions[] = "<a class='button$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
}
}
}
@ -281,7 +281,7 @@ foreach ( $themes as $theme ) :
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<a class="button activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
<?php } ?>
@ -333,7 +333,7 @@ $can_install = current_user_can( 'install_themes' );
), admin_url( 'themes.php' ) );
$delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet );
?>
<td><a href="<?php echo esc_url( $delete_url ); ?>" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a></td>
<td><a href="<?php echo esc_url( $delete_url ); ?>" class="button delete-theme"><?php _e( 'Delete' ); ?></a></td>
<?php
}
@ -348,7 +348,7 @@ $can_install = current_user_can( 'install_themes' );
), admin_url( 'update.php' ) );
$install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name );
?>
<td><a href="<?php echo esc_url( $install_url ); ?>" class="button button-secondary install-theme"><?php _e( 'Install Parent Theme' ); ?></a></td>
<td><a href="<?php echo esc_url( $install_url ); ?>" class="button install-theme"><?php _e( 'Install Parent Theme' ); ?></a></td>
<?php
}
}
@ -410,7 +410,7 @@ $can_install = current_user_can( 'install_themes' );
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
<# } #>
</div>
@ -469,13 +469,13 @@ $can_install = current_user_can( 'install_themes' );
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<# if ( data.actions.activate ) { #>
<a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<a href="{{{ data.actions.activate }}}" class="button activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<# } #>
<a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
</div>
<# if ( ! data.active && data.actions['delete'] ) { #>
<a href="{{{ data.actions['delete'] }}}" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a>
<a href="{{{ data.actions['delete'] }}}" class="button delete-theme"><?php _e( 'Delete' ); ?></a>
<# } #>
</div>
</div>

View File

@ -49,7 +49,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<p class="pressthis-bookmarklet-wrapper">
<a class="pressthis-bookmarklet" onclick="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ); ?></span></a>
<button type="button" class="button button-secondary pressthis-js-toggle js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap">
<button type="button" class="button pressthis-js-toggle js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap">
<span class="dashicons dashicons-clipboard"></span>
<span class="screen-reader-text"><?php _e( 'Copy &#8220;Press This&#8221; bookmarklet code' ) ?></span>
</button>
@ -68,7 +68,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<p><?php _e( 'Follow the link to open Press This. Then add it to your device&#8217;s bookmarks or home screen.' ); ?></p>
<p>
<a class="button button-secondary" href="<?php echo htmlspecialchars( admin_url( 'press-this.php' ) ); ?>"><?php _e( 'Open Press This' ) ?></a>
<a class="button" href="<?php echo htmlspecialchars( admin_url( 'press-this.php' ) ); ?>"><?php _e( 'Open Press This' ) ?></a>
</p>
<script>
jQuery( document ).ready( function( $ ) {

View File

@ -92,18 +92,18 @@ function list_core_update( $update ) {
echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>';
if ( $show_buttons ) {
if ( $first_pass ) {
submit_button( $submit, $current ? 'button' : 'primary regular', 'upgrade', false );
submit_button( $submit, $current ? '' : 'primary regular', 'upgrade', false );
$first_pass = false;
} else {
submit_button( $submit, 'button', 'upgrade', false );
submit_button( $submit, '', 'upgrade', false );
}
echo '&nbsp;<a href="' . esc_url( $update->download ) . '" class="button">' . $download . '</a>&nbsp;';
}
if ( 'en_US' != $update->locale )
if ( !isset( $update->dismissed ) || !$update->dismissed )
submit_button( __('Hide this update'), 'button', 'dismiss', false );
submit_button( __( 'Hide this update' ), '', 'dismiss', false );
else
submit_button( __('Bring back this update'), 'button', 'undismiss', false );
submit_button( __( 'Bring back this update' ), '', 'undismiss', false );
echo '</p>';
if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) )
echo '<p class="hint">'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'</p>';

View File

@ -505,16 +505,16 @@ if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profi
<th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password' ); ?></button>
<button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password' ); ?></button>
<div class="wp-pwd hide-if-js">
<span class="password-input-wrapper">
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
</span>
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden"></span>
<span class="text"><?php _e( 'Hide' ); ?></span>
</button>
<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
<button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
<span class="text"><?php _e( 'Cancel' ); ?></span>
</button>
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
@ -544,7 +544,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
<tr class="user-sessions-wrap hide-if-no-js">
<th><?php _e( 'Sessions' ); ?></th>
<td aria-live="assertive">
<div class="destroy-sessions"><button type="button" disabled class="button button-secondary"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
<div class="destroy-sessions"><button type="button" disabled class="button"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
<p class="description">
<?php _e( 'You are only logged in at this location.' ); ?>
</p>
@ -554,7 +554,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
<tr class="user-sessions-wrap hide-if-no-js">
<th><?php _e( 'Sessions' ); ?></th>
<td aria-live="assertive">
<div class="destroy-sessions"><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
<div class="destroy-sessions"><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
<p class="description">
<?php _e( 'Did you lose your phone or leave your account logged in at a public computer? You can log out everywhere else, and stay logged in here.' ); ?>
</p>
@ -564,7 +564,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
<tr class="user-sessions-wrap hide-if-no-js">
<th><?php _e( 'Sessions' ); ?></th>
<td>
<p><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
<p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
<p class="description">
<?php
/* translators: 1: User's display name. */

View File

@ -421,17 +421,17 @@ $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl
</th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
<button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
<div class="wp-pwd hide-if-js">
<?php $initial_password = wp_generate_password( 24 ); ?>
<span class="password-input-wrapper">
<input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
</span>
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden"></span>
<span class="text"><?php _e( 'Hide' ); ?></span>
</button>
<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
<button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
<span class="text"><?php _e( 'Cancel' ); ?></span>
</button>
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>

View File

@ -315,9 +315,9 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
<a href="widgets.php" class="button alignleft"><?php _e('Cancel'); ?></a>
<?php
} else {
submit_button( __( 'Delete' ), 'button alignleft', 'removewidget', false );
submit_button( __( 'Delete' ), 'alignleft', 'removewidget', false );
}
submit_button( __( 'Save Widget' ), 'button-primary alignright', 'savewidget', false ); ?>
submit_button( __( 'Save Widget' ), 'primary alignright', 'savewidget', false ); ?>
<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" />
<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
@ -500,8 +500,8 @@ foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
<div class="widgets-chooser">
<ul class="widgets-chooser-sidebars"></ul>
<div class="widgets-chooser-actions">
<button class="button-secondary"><?php _e( 'Cancel' ); ?></button>
<button class="button-primary"><?php _e( 'Add Widget' ); ?></button>
<button class="button widgets-chooser-cancel"><?php _e( 'Cancel' ); ?></button>
<button class="button button-primary widgets-chooser-add"><?php _e( 'Add Widget' ); ?></button>
</div>
</div>

View File

@ -914,7 +914,7 @@ final class WP_Customize_Nav_Menus {
</p>
<p class="button-controls">
<span class="add-to-menu">
<input type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="custom-menu-item-submit">
<input type="submit" class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="custom-menu-item-submit">
<span class="spinner"></span>
</span>
</p>

View File

@ -712,7 +712,7 @@ final class WP_Customize_Widgets {
<% }); %>
</ul>
<div class="move-widget-actions">
<button class="move-widget-btn button-secondary" type="button">{btn}</button>
<button class="move-widget-btn button" type="button">{btn}</button>
</div>
</div>'
);

View File

@ -48,7 +48,7 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
*/
public function content_template() {
?>
<button type="button" class="button-secondary add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
<button type="button" class="button add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
<?php _e( 'Add Items' ); ?>
</button>
<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="reorder-items-desc-{{ data.menu_id }}">

View File

@ -36,7 +36,7 @@ class WP_Customize_New_Menu_Section extends WP_Customize_Section {
protected function render() {
?>
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
<button type="button" class="button-secondary add-new-menu-item add-menu-toggle" aria-expanded="false">
<button type="button" class="button add-new-menu-item add-menu-toggle" aria-expanded="false">
<?php echo esc_html( $this->title ); ?>
</button>
<ul class="new-menu-section-content"></ul>

View File

@ -57,7 +57,7 @@ class WP_Widget_Area_Customize_Control extends WP_Customize_Control {
public function render_content() {
$id = 'reorder-widgets-desc-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
?>
<button type="button" class="button-secondary add-new-widget" aria-expanded="false" aria-controls="available-widgets">
<button type="button" class="button add-new-widget" aria-expanded="false" aria-controls="available-widgets">
<?php _e( 'Add a Widget' ); ?>
</button>
<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder widgets' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">

View File

@ -481,7 +481,7 @@ function wp_login_form( $args = array() ) {
' . $login_form_middle . '
' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '
<p class="login-submit">
<input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" />
<input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" />
<input type="hidden" name="redirect_to" value="' . esc_url( $args['redirect'] ) . '" />
</p>
' . $login_form_bottom . '

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38671';
$wp_version = '4.7-alpha-38672';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.