| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | Plugin Name: Button Styles |
|---|
| 4 | */ |
|---|
| 5 | |
|---|
| 6 | global $button_styles; |
|---|
| 7 | $button_styles = new Button_Styles(); |
|---|
| 8 | |
|---|
| 9 | class Button_Styles { |
|---|
| 10 | |
|---|
| 11 | function __construct() { |
|---|
| 12 | add_action( 'admin_menu', array( &$this, 'menu' ) ); |
|---|
| 13 | } |
|---|
| 14 | |
|---|
| 15 | function menu() { |
|---|
| 16 | add_management_page( __( 'Button Styles', 'buttons' ), __( 'Button Styles', 'buttons' ), 'edit_posts', __FILE__, array( &$this, 'page' ) ); |
|---|
| 17 | } |
|---|
| 18 | |
|---|
| 19 | function page() { |
|---|
| 20 | ?><div class="wrap"> |
|---|
| 21 | <h2><?php _e( 'Button Styles', 'buttons' ); ?></h2> |
|---|
| 22 | |
|---|
| 23 | <!-- <p><a href="#" title="This is here so you can easily cmd/ctrl+f to this part of the page">:)</a></p> --> |
|---|
| 24 | |
|---|
| 25 | <?php //submit_button( $text, $type, $name, $wrap, $other_attributes ); ?> |
|---|
| 26 | |
|---|
| 27 | <div style="float: left; width: 18%;"> |
|---|
| 28 | <?php |
|---|
| 29 | submit_button('Primary', 'button-primary'); |
|---|
| 30 | submit_button('Primary (hover)', 'button-primary hover'); |
|---|
| 31 | submit_button('Primary (focus)', 'button-primary focus'); |
|---|
| 32 | submit_button('Primary (active)', 'button-primary active'); |
|---|
| 33 | submit_button('Primary (disabled)', 'button-primary active', null, null, array('disabled'=>'disabled')); |
|---|
| 34 | ?> |
|---|
| 35 | </div> |
|---|
| 36 | <div style="float: left; width: 18%;"> |
|---|
| 37 | <?php |
|---|
| 38 | submit_button('Secondary', 'button-secondary'); |
|---|
| 39 | submit_button('Secondary (hover)', 'button-secondary hover'); |
|---|
| 40 | submit_button('Secondary (focus)', 'button-secondary focus'); |
|---|
| 41 | submit_button('Secondary (active)', 'button-secondary active'); |
|---|
| 42 | submit_button('Secondary (disabled)', 'button-secondary active', null, null, array('disabled'=>'disabled')); |
|---|
| 43 | ?> |
|---|
| 44 | </div> |
|---|
| 45 | <!-- <div style="float: left; width: 18%;"> |
|---|
| 46 | <?php |
|---|
| 47 | submit_button('Delete', 'button-secondary delete'); |
|---|
| 48 | submit_button('Delete (hover)', 'button-secondary delete hover'); |
|---|
| 49 | submit_button('Delete (focus)', 'button-secondary delete focus'); |
|---|
| 50 | submit_button('Delete (active)', 'button-secondary delete active'); |
|---|
| 51 | submit_button('Delete (disabled)', 'button-secondary delete active', null, null, array('disabled'=>'disabled')); |
|---|
| 52 | ?> |
|---|
| 53 | </div> --> |
|---|
| 54 | |
|---|
| 55 | <div style="float: left; width: 18%;"> |
|---|
| 56 | <?php |
|---|
| 57 | submit_button('Highlighted', 'button-highlighted'); |
|---|
| 58 | submit_button('Highlighted (hover)', 'button-highlighted hover'); |
|---|
| 59 | submit_button('Highlighted (focus)', 'button-highlighted focus'); |
|---|
| 60 | submit_button('Highlighted (active)', 'button-highlighted active'); |
|---|
| 61 | submit_button('Highlighted (disabled)', 'button-highlighted active', null, null, array('disabled'=>'disabled')); |
|---|
| 62 | ?> |
|---|
| 63 | </div> |
|---|
| 64 | |
|---|
| 65 | <!-- <div class="clear"></div> --> |
|---|
| 66 | |
|---|
| 67 | <div style="float: left; width: 18%;"> |
|---|
| 68 | <?php |
|---|
| 69 | submit_button('.button', 'button'); |
|---|
| 70 | submit_button('.button (hover)', 'button hover'); |
|---|
| 71 | submit_button('.button (focus)', 'button focus'); |
|---|
| 72 | submit_button('.button (active)', 'button active'); |
|---|
| 73 | submit_button('.button (disabled)', 'button active', null, null, array('disabled'=>'disabled')); |
|---|
| 74 | ?> |
|---|
| 75 | </div> |
|---|
| 76 | |
|---|
| 77 | <div style="float: left; width: 14%;"> |
|---|
| 78 | <?php |
|---|
| 79 | submit_button('Short', 'button short'); |
|---|
| 80 | submit_button('Short (hover)', 'button short hover'); |
|---|
| 81 | submit_button('Short (focus)', 'button short focus'); |
|---|
| 82 | submit_button('Short (active)', 'button short active'); |
|---|
| 83 | submit_button('Short (disabled)', 'button short active', null, null, array('disabled'=>'disabled')); |
|---|
| 84 | ?> |
|---|
| 85 | </div> |
|---|
| 86 | |
|---|
| 87 | <div style="float: left; width: 14%;"> |
|---|
| 88 | <?php |
|---|
| 89 | submit_button('Small', 'button small'); |
|---|
| 90 | submit_button('Small (hover)', 'button small hover'); |
|---|
| 91 | submit_button('Small (focus)', 'button small focus'); |
|---|
| 92 | submit_button('Small (active)', 'button small active'); |
|---|
| 93 | submit_button('Small (disabled)', 'button small active', null, null, array('disabled'=>'disabled')); |
|---|
| 94 | ?> |
|---|
| 95 | </div> |
|---|
| 96 | |
|---|
| 97 | </div><?php |
|---|
| 98 | |
|---|
| 99 | } |
|---|
| 100 | |
|---|
| 101 | } |
|---|