WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/28/2016 07:53:07 PM (3 years ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r38028 r38672  
    243243<form method="post">
    244244<?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
    245 <?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/>
     245<?php submit_button( __( 'Remove Background Image' ), '', 'remove-background', false ); ?><br/>
    246246<?php _e('This will remove the background image. You will not be able to restore any customizations.') ?>
    247247</form>
     
    257257<form method="post">
    258258<?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
    259 <?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/>
     259<?php submit_button( __( 'Restore Original Image' ), '', 'reset-background', false ); ?><br/>
    260260<?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?>
    261261</form>
     
    273273        <input type="hidden" name="action" value="save" />
    274274        <?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
    275         <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
     275        <?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
    276276    </p>
    277277    <p>
Note: See TracChangeset for help on using the changeset viewer.