Make WordPress Core


Ignore:
Timestamp:
09/28/2016 07:53:07 PM (9 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/update-core.php

    r38470 r38672  
    9393    if ( $show_buttons ) {
    9494        if ( $first_pass ) {
    95             submit_button( $submit, $current ? 'button' : 'primary regular', 'upgrade', false );
     95            submit_button( $submit, $current ? '' : 'primary regular', 'upgrade', false );
    9696            $first_pass = false;
    9797        } else {
    98             submit_button( $submit, 'button', 'upgrade', false );
     98            submit_button( $submit, '', 'upgrade', false );
    9999        }
    100100        echo '&nbsp;<a href="' . esc_url( $update->download ) . '" class="button">' . $download . '</a>&nbsp;';
     
    102102    if ( 'en_US' != $update->locale )
    103103        if ( !isset( $update->dismissed ) || !$update->dismissed )
    104             submit_button( __('Hide this update'), 'button', 'dismiss', false );
     104            submit_button( __( 'Hide this update' ), '', 'dismiss', false );
    105105        else
    106             submit_button( __('Bring back this update'), 'button', 'undismiss', false );
     106            submit_button( __( 'Bring back this update' ), '', 'undismiss', false );
    107107    echo '</p>';
    108108    if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) )
Note: See TracChangeset for help on using the changeset viewer.