Make WordPress Core

Ticket #21598: buttons.2.php

File buttons.2.php, 3.1 KB (added by trepmal, 14 years ago)

same plugin, less yelling

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 active', null, null, 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 active', null, null, 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 active', null, null, 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 active', null, null, array('disabled'=>'disabled'));
62 ?>
63 </div>
64
65 <div style="float: left; width: 20%;">
66 <?php
67 submit_button('Small', 'button small');
68 submit_button('Small (hover)', 'button small hover');
69 submit_button('Small (focus)', 'button small focus');
70 submit_button('Small (active)', 'button small active');
71 submit_button('Small (disabled)', 'button small active', null, null, array('disabled'=>'disabled'));
72 ?>
73 </div>
74
75 <div style="float: left; width: 20%;">
76 <?php
77 submit_button('.button', 'button');
78 submit_button('.button (hover)', 'button hover');
79 submit_button('.button (focus)', 'button focus');
80 submit_button('.button (active)', 'button active');
81 submit_button('.button (disabled)', 'button active', null, null, array('disabled'=>'disabled'));
82 ?>
83 </div>
84
85 </div><?php
86
87 }
88
89}