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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2016-09-28 19:53:07 +00:00
parent 02cf2a731f
commit ee7f970ffa
52 changed files with 126 additions and 125 deletions
@@ -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' ) ) {
@@ -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
@@ -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
}
@@ -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' ) ) {
@@ -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
@@ -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.' ),
@@ -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 ); ?>" />
@@ -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 ); ?>
@@ -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>
@@ -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;
/**
+2 -2
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
+1 -1
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>
+7 -7
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>
+3 -3
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">
+5 -5
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>
+2 -2
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
+7 -6
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' );
+3 -3
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
}
+2 -2
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 ";
}
}