skipv1_0_0Button

The Facebook Fanpage Import skip v1 0 Button class.

Defined (1)

The class is defined in the following location(s).

/includes/skip/elements/forms/button.php  
  1. class Button extends Form_Element{ 
  2. /** 
  3. * Constructor 
  4. * @since 1.0 
  5. * @param string $value The text which appears on the button. 
  6. * @param array/string $args List of Arguments. 
  7. */ 
  8. function __construct( $value, $args = array() ) { 
  9. $defaults = array( 
  10. 'name' => '',  
  11. 'submit' => TRUE 
  12. ); 
  13.  
  14. $args = wp_parse_args( $args, $defaults ); 
  15. extract( $args , EXTR_SKIP ); 
  16.  
  17. $args[ 'close_tag' ] = FALSE; // No Close tag for Input type Text 
  18. $args[ 'save' ] = FALSE; 
  19. $args[ 'value' ] = $value; 
  20.  
  21. parent::__construct( 'input', $name, $args ); 
  22.  
  23. $this->add_param( 'type', 'submit' ); // This is a text field! 
  24. $this->add_param( 'class', 'button' ); // This is a text field! 
  25.  
  26. /** 
  27. * Rendering Button 
  28. * @since 1.0 
  29. * @return string $html Returns The HTML Code 
  30. */ 
  31. public function render() { 
  32. global $skip_javascripts; 
  33.  
  34. $skip_javascripts[] = '$("#' . $this->params[ 'id' ] . '").button();'; 
  35.  
  36. return parent::render();