Make WordPress Core


Ignore:
Timestamp:
09/08/2012 04:58:34 AM (13 years ago)
Author:
koopersmith
Message:

New button styles.

Using the new buttons:

  • Button classes are now stackable.
  • All buttons should use a base class of "button".
  • Buttons default to the gray style (formerly "button-secondary"). Buttons can add a style by adding additional classes. To make a primary button, add the "button-primary" class.
  • Buttons can be rendered in various sizes. In addition to the default size, you can add "button-large", "button-small", or "button-tiny".

For backwards compatibility reasons, "button-primary" and "button-secondary" both work as standalone classes.

get_submit_button() has been adjusted to handle shorthand button classes (i.e. button classes can be passed without the "button-" prefix).

props lessbloat, helenyhou, trepmal, nacin. see #21598.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-list-table.php

    r21750 r21789  
    218218    <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
    219219    <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
    220     <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
     220    <?php submit_button( $text, 'small', false, false, array('id' => 'search-submit') ); ?>
    221221</p>
    222222<?php
     
    305305        echo "</select>\n";
    306306
    307         submit_button( __( 'Apply' ), 'button-secondary action', false, false, array( 'id' => "doaction$two" ) );
     307        submit_button( __( 'Apply' ), 'small action', false, false, array( 'id' => "doaction$two" ) );
    308308        echo "\n";
    309309    }
Note: See TracChangeset for help on using the changeset viewer.