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