<?php
/*
Plugin Name: Button Styles
*/

global $button_styles;
$button_styles = new Button_Styles();

class Button_Styles {

	function __construct() {
		add_action( 'admin_menu', array( &$this, 'menu' ) );
	}

	function menu() {
		add_management_page( __( 'Button Styles', 'buttons' ), __( 'Button Styles', 'buttons' ), 'edit_posts', __FILE__, array( &$this, 'page' ) );
	}

	function page() {

		function render_button_states( $text, $type, $width = '18%' ) {
			//submit_button( $text, $type, $name, $wrap, $other_attributes );

			echo '<div style="float: left; width: ' . $width . '">';
			submit_button( $text, $type );
			submit_button( $text . ' (hover)', $type . ' hover' );
			submit_button( $text . ' (focus)', $type . ' focus' );
			submit_button( $text . ' (active)', $type . ' active' );
			submit_button( $text . ' (disabled)', $type . ' active', null, null, array( 'disabled' => 'disabled' ) );
			echo '</div>';
		}

		?><div class="wrap">
		<h2><?php _e( 'Button Styles', 'buttons' ); ?></h2>

		<!-- <p><a href="#" title="This is here so you can easily cmd/ctrl+f to this part of the page">:)</a></p> -->

		<?php render_button_states( 'Primary', 'button-primary' ); ?>
		<?php render_button_states( 'Secondary', 'button-secondary' ); ?>
		<?php /*render_button_states( 'Delete', 'button-secondary delete' );*/ ?>
		<?php render_button_states( 'Highlighted', 'button-highlighted' ); ?>
		<?php render_button_states( '.button', 'button' ); ?>
		<?php render_button_states( 'Short', 'button short', '14%' ); ?>
		<?php render_button_states( 'Small', 'button small', '14%' ); ?>

		</div><?php

	}

}