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