1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: WP Button Styles |
---|
4 | Plugin URI: http://make.wordpress.org/ui |
---|
5 | Description: Enables a Button Styles page showcasing various core button styles. |
---|
6 | Author: WordPress UI Group |
---|
7 | Author URI: http://make.wordpress.org/ui |
---|
8 | Version: 1.0 |
---|
9 | */ |
---|
10 | |
---|
11 | /** |
---|
12 | * Adds a tab "Style Guide" to the admin menu |
---|
13 | */ |
---|
14 | function wp_button_styles_add_page() { |
---|
15 | add_menu_page( 'Button Styles', 'Button Styles', 'add_users', 'wp-button-styles.php', 'wp_button_styles_render_page'); |
---|
16 | } |
---|
17 | add_action('admin_menu', 'wp_button_styles_add_page'); |
---|
18 | |
---|
19 | /** |
---|
20 | * Renders the Style Guide page |
---|
21 | */ |
---|
22 | function wp_button_styles_render_page() { |
---|
23 | ?> |
---|
24 | <div class="wrap"> |
---|
25 | <h2>Style Guide</h2> |
---|
26 | <p> |
---|
27 | <? submit_button( __( 'Primary Button' ), 'button-primary', false, false, array() ); ?> |
---|
28 | <? submit_button( __( 'Primary Button Disabled' ), 'button-primary button-primary-disabled', false, false, array() ); ?> |
---|
29 | </p> |
---|
30 | <p> |
---|
31 | <? submit_button( __( 'Regular Button' ), 'button', false, false, array() ); ?> |
---|
32 | <? submit_button( __( 'Button Disabled' ), 'button button-disabled', false, false, array() ); ?> |
---|
33 | <? submit_button( __( 'Button Highlighted' ), 'button button-highlighted', false, false, array() ); ?> |
---|
34 | </p> |
---|
35 | <p> |
---|
36 | <? submit_button( __( 'Small' ), 'button small', false, false, array() ); ?> |
---|
37 | <? submit_button( __( 'Short' ), 'button short', false, false, array() ); ?> |
---|
38 | <? submit_button( __( 'Large' ), 'button large', false, false, array() ); ?> |
---|
39 | </p> |
---|
40 | </div> |
---|
41 | |
---|
42 | |
---|
43 | <?php |
---|
44 | } |
---|