Make WordPress Core


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

    r37985 r38672  
    8686    <?php endif; ?>
    8787    <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
    88     <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
     88    <?php submit_button( __( 'Search' ), '', 'search', false ); ?>
    8989</form>
    9090<?php
     
    131131</div>
    132132<br class="clear" />
    133 <?php submit_button( __( 'Find Themes' ), 'button', 'search' ); ?>
     133<?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
    134134</form>
    135135<?php
     
    146146    <label class="screen-reader-text" for="themezip"><?php _e( 'Theme zip file' ); ?></label>
    147147    <input type="file" id="themezip" name="themezip" />
    148     <?php submit_button( __( 'Install Now' ), 'button', 'install-theme-submit', false ); ?>
     148    <?php submit_button( __( 'Install Now' ), '', 'install-theme-submit', false ); ?>
    149149</form>
    150150    <?php
Note: See TracChangeset for help on using the changeset viewer.