Make WordPress Core


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

    r38459 r38672  
    428428            <label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
    429429            <input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
    430             <?php submit_button( __( 'Search Users' ), 'button', false, false, array( 'id' => 'submit_users' ) ); ?>
     430            <?php submit_button( __( 'Search Users' ), '', false, false, array( 'id' => 'submit_users' ) ); ?>
    431431        </p>
    432432    </form>
     
    436436            <label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
    437437            <input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
    438             <?php submit_button( __( 'Search Sites' ), 'button', false, false, array( 'id' => 'submit_sites' ) ); ?>
     438            <?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
    439439        </p>
    440440    </form>
Note: See TracChangeset for help on using the changeset viewer.