if ($this->id != '') { $id = ' id="' . $this->id . '"'; } if ($this->name != '') { $name = ' name="' . $this->name . '"'; } if ($this->value != '') { $value = ' value="' . $this->value . '"'; }
* * @param string $name Name of radiobutton * @param array $args Array of [ $id, $extra Extra radiobutton code, $option_group Name of optiongroup where textfield have to be saved, $before_radiobutton Code before radiobutton, $after_radiobutton Code after radiobutton ] */ function tk_wp_form_radiobutton($name, $value, $args = array()) { $this->__construct($name, $value, $args); } /** * PHP 5 constructor * * @package Themekraft Framework * @since 0.1.0 * * @param string $name Name of radiobutton * @param array $args Array of [ $id, $extra Extra radiobutton code, $option_group Name of optiongroup where textfield have to be saved, $before_radiobutton Code before radiobutton, $after_radiobutton Code after radiobutton ] */ function __construct($name, $value, $args = array()) { global $post, $tk_form_instance_option_group; $defaults = array('id' => '', 'extra' => '', 'option_group' => $tk_form_instance_option_group, 'before_element' => '', 'after_element' => ''); $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); if ($post != '') {