function get_copy($sol_size) { $options = get_option('a2b_option_group'); $copy = $options['copy']; if (!$copy) { $copy = get_default_copy($sol_size); } return $copy; }
/** * Get the settings option array and print one of its values */ public function copy_callback() { $is_set = $this->options['copy'] && $this->options['copy'] != ''; $val = $is_set ? esc_attr($this->options['copy']) : get_default_copy(); printf('<textarea id="copy" style="width: 500px;" name="a2b_option_group[copy]">' . $val . '</textarea>', $val); }