* @since 0.1.0 * * @param array $args Array of [ $id Id, $name Name, $value Value, $submit use submit, $extra Extra checkbox code ] */ function __construct($value, $args = array()) { global $tk_form_instance_option_group; if (isset($args['name'])) { $field_name = $tk_form_instance_option_group . '_values[' . $args['name'] . ']'; $args['name'] = $field_name;
/** * PHP 5 constructor * * @package Themekraft Framework * @since 0.1.0 * * @param array $args Array of [ $value Value, $args ] */ function __construct($value, $args = array()) { global $tk_form_instance_option_group; $defaults = array('id' => '', 'name' => $value, 'forms' => array(), 'file_name' => 'export_' . date('Ymdhis', time()) . '.txt', 'extra' => '', 'before_element' => '', 'after_element' => ''); add_filter('sanitize_option_' . $tk_form_instance_option_group . '_values', array($this, 'validate_actions'), 9999); $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); parent::__construct($value, $args); $this->lookup_name = $name; $this->submit = TRUE; $this->forms = $forms; $this->file_name = $file_name; $this->extra = $extra; }