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/includes/class-wp-plugins-list-table.php

    r38307 r38672  
    368368            <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
    369369            <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...' ); ?>"/>
    370             <?php submit_button( $text, 'button hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
     370            <?php submit_button( $text, 'hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
    371371        </p>
    372372        <?php
     
    497497
    498498        if ( 'recently_activated' == $status ) {
    499             submit_button( __( 'Clear List' ), 'button', 'clear-recent-list', false );
     499            submit_button( __( 'Clear List' ), '', 'clear-recent-list', false );
    500500        } elseif ( 'top' === $which && 'mustuse' === $status ) {
    501501            /* translators: %s: mu-plugins directory name */
Note: See TracChangeset for help on using the changeset viewer.