skipv1_0_0Button
The WordPress Core skip v1 0 Button class.
Defined (1)
The class is defined in the following location(s).
- /includes/skip/elements/forms/button.php
- class Button extends Form_Element{
- /**
- * Constructor
- * @since 1.0
- * @param string $value The text which appears on the button.
- * @param array/string $args List of Arguments.
- */
- function __construct( $value, $args = array() ) {
- $defaults = array(
- 'name' => '',
- 'submit' => TRUE
- );
- $args = wp_parse_args( $args, $defaults );
- extract( $args , EXTR_SKIP );
- $args[ 'close_tag' ] = FALSE; // No Close tag for Input type Text
- $args[ 'save' ] = FALSE;
- $args[ 'value' ] = $value;
- parent::__construct( 'input', $name, $args );
- $this->add_param( 'type', 'submit' ); // This is a text field!
- $this->add_param( 'class', 'button' ); // This is a text field!
- }
- /**
- * Rendering Button
- * @since 1.0
- * @return string $html Returns The HTML Code
- */
- public function render() {
- global $skip_javascripts;
- $skip_javascripts[] = '$("#' . $this->params[ 'id' ] . '").button();';
- return parent::render();
- }
- }