skipv1_0_0Editor

The Facebook Fanpage Import skip v1 0 Editor class.

Defined (1)

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

/includes/skip/elements/forms/editor.php  
  1. class Editor extends Form_Element{ 
  2. var $buffer; 
  3.  
  4. /** 
  5. * Constructor 
  6. * @since 1.0 
  7. * @param string $name Name of field. 
  8. * @param array/string $args List of Arguments. 
  9. */ 
  10. function __construct( $name, $label = FALSE, $args = array() ) { 
  11. $args = wp_parse_args( $args ); 
  12. $args[ 'label' ] = $label; 
  13. $args[ 'echo_tag' ] = FALSE; 
  14.  
  15. parent::__construct( 'textarea', $name, $args ); 
  16.  
  17. /** 
  18. * Rendering Editor field 
  19. * @package Skip 
  20. * @since 1.0 
  21. * @return string $html Returns The HTML Code. 
  22. */  
  23. public function render() { 
  24. global $skip_used_dialog; 
  25.  
  26. $skip_used_dialog = TRUE; 
  27.  
  28. if( array_key_exists( 'class', $this->params ) ) 
  29. $class = $this->params[ 'class' ] . ' skip_editor'; 
  30. else  
  31. $class = 'skip_editor'; 
  32.  
  33. $settings = array( 
  34. 'textarea_name' => $this->field_name,  
  35. 'editor_class' => $class 
  36. ); 
  37.  
  38. ob_start( array( $this, 'buffer' ) ); 
  39. wp_editor( stripslashes( $this->value ), $this->params['id'], $settings ); 
  40. ob_end_flush(); 
  41.  
  42. $this->content = $this->buffer ; 
  43.  
  44. return parent::render(); 
  45.  
  46. function buffer( $content ) { 
  47. $this->buffer = $content;