skipv1_0_0Export_Button

The Facebook Fanpage Import skip v1 0 Export Button class.

Defined (1)

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

/includes/skip/elements/forms/export.php  
  1. class Export_Button extends WP_Form_Button{ 
  2.  
  3. /** 
  4. * Constructor 
  5. * @package Skip 
  6. * @since 1.0 
  7. * @param array $args Array of [ $value Value, $args ] 
  8. */ 
  9. function __construct( $value, $args = array() ) { 
  10. global $skip_form_instance_option_group; 
  11.  
  12. $defaults = array( 
  13. 'id' => '',  
  14. 'name' => $value,  
  15. 'forms' => array(),  
  16. 'file_name' => 'export_' . date( 'Ymdhis', time() ) . '.txt',  
  17. 'extra' => '',  
  18. 'before_element' => '',  
  19. 'after_element' => '' 
  20. ); 
  21.  
  22. add_filter( 'sanitize_option_' . $skip_form_instance_option_group . '_values', array( $this , 'validate_actions' ), 9999 ); 
  23.  
  24. $args = wp_parse_args($args, $defaults); 
  25. extract( $args , EXTR_SKIP ); 
  26.  
  27. parent::__construct( $value, $args ); 
  28.  
  29. $this->lookup_name = $name; 
  30.  
  31. $this->submit = TRUE; 
  32. $this->forms = $forms; 
  33. $this->file_name = $file_name; 
  34. $this->extra = $extra; 
  35.  
  36. function validate_actions( $input ) { 
  37. global $skip_form_instance_option_group; 
  38.  
  39. if( $input[ $this->lookup_name ] != '' ) { 
  40. download_export_values( $this->forms, $this->file_name ); 
  41. $input = get_option( $skip_form_instance_option_group . '_values' ); 
  42. return $input; 
  43.