1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: WP Style Guide |
---|
4 | Plugin URI: http://make.wordpress.org/ui |
---|
5 | Description: Enables a Style Guide 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 style_guide_add_page() { |
---|
15 | add_menu_page( 'Style Guide', 'Style Guide', 'add_users', 'wp-style-guide.php', 'style_guide_render_page'); |
---|
16 | } |
---|
17 | add_action('admin_menu', 'style_guide_add_page'); |
---|
18 | |
---|
19 | /** |
---|
20 | * Renders the Style Guide page |
---|
21 | */ |
---|
22 | function style_guide_render_page() { |
---|
23 | ?> |
---|
24 | <div class="wrap"> |
---|
25 | <h2>Style Guide</h2> |
---|
26 | <p> |
---|
27 | <input type="submit" class="button-primary" value="Primary Button"> |
---|
28 | <input type="submit" class="button-primary button-primary-disabled" value="Primary Button Disabled"> |
---|
29 | </p> |
---|
30 | <p> |
---|
31 | <input type="submit" class="button" value="Regular Button"> |
---|
32 | <input type="submit" class="button button-disabled" value="Button Disabled"> |
---|
33 | <input type="submit" class="button-highlighted" value="Button Highlighted"> |
---|
34 | </p> |
---|
35 | <p> |
---|
36 | <input type="submit" class="button small" value="Small"> |
---|
37 | <input type="submit" class="button short" value="Short"> |
---|
38 | <input type="submit" class="button large" value="Large"> |
---|
39 | |
---|
40 | </p> |
---|
41 | </div> |
---|
42 | |
---|
43 | |
---|
44 | <?php |
---|
45 | } |
---|