mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 04:04:35 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user