Make WordPress Core

Ticket #21598: buttons.5.php

File buttons.5.php, 3.9 KB (added by trepmal, 14 years ago)
Line 
1<?php
2/*
3Plugin Name: Button Styles
4*/
5
6global $button_styles;
7$button_styles = new Button_Styles();
8
9class 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: 20%;">
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', '', true, array('disabled' => 'disabled') );
34 ?>
35 </div>
36 <div style="float: left; width: 20%;">
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', '', true, array('disabled' => 'disabled') );
43 ?>
44 </div>
45 <!-- <div style="float: left; width: 20%;">
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', '', true, array('disabled' => 'disabled') );
52 ?>
53 </div> -->
54
55 <div style="float: left; width: 20%;">
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', '', true, array('disabled' => 'disabled') );
62 ?>
63 </div>
64
65 <div style="float: left; width: 18%;">
66 <?php
67 submit_button('.button', 'button');
68 submit_button('.button (hover)', 'button hover');
69 submit_button('.button (focus)', 'button focus');
70 submit_button('.button (active)', 'button active');
71 submit_button('.button (disabled)', 'button', '', true, array('disabled' => 'disabled') );
72 ?>
73 </div>
74
75 <div class="clear"></div>
76
77 <div style="float: left; width: 18%;">
78 <?php
79 submit_button('Big', 'button big');
80 submit_button('Big (hover)', 'button big hover');
81 submit_button('Big (focus)', 'button big focus');
82 submit_button('Big (active)', 'button big active');
83 submit_button('Big (disabled)', 'button big', '', true, array('disabled' => 'disabled') );
84 ?>
85 </div>
86
87 <div style="float: left; width: 18%;">
88 <?php
89 submit_button('Short', 'button short');
90 submit_button('Short (hover)', 'button short hover');
91 submit_button('Short (focus)', 'button short focus');
92 submit_button('Short (active)', 'button short active');
93 submit_button('Short (disabled)', 'button short', '', true, array('disabled' => 'disabled') );
94 ?>
95 </div>
96
97 <div style="float: left; width: 18%;">
98 <?php
99 submit_button('Small', 'button small');
100 submit_button('Small (hover)', 'button small hover');
101 submit_button('Small (focus)', 'button small focus');
102 submit_button('Small (active)', 'button small active');
103 submit_button('Small (disabled)', 'button small', '', true, array('disabled' => 'disabled') );
104 ?>
105 </div>
106
107 </div><?php
108
109 }
110
111}