WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/08/2012 04:58:34 AM (9 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-media-list-table.php

    r21736 r21789  
    9292
    9393            do_action( 'restrict_manage_posts' );
    94             submit_button( __( 'Filter' ), 'secondary', false, false, array( 'id' => 'post-query-submit' ) );
     94            submit_button( __( 'Filter' ), 'small', false, false, array( 'id' => 'post-query-submit' ) );
    9595        }
    9696
     
    9898            submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false );
    9999        } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
    100             submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false );
     100            submit_button( __( 'Empty Trash' ), 'small apply', 'delete_all', false );
    101101        } ?>
    102102        </div>
Note: See TracChangeset for help on using the changeset viewer.