protected function format_field($name, $value) { $format = isset($this->form['formats'][$name]) ? $this->form['formats'][$name] : ''; $value = $this->sanitize($value); if (!empty($format)) { if ('int' == $format) { // 'int' is understood as not a blank string and greater than 0 if ('' === $value || 0 > $value) { return $this->plugin->options_default[$name]; } return (int) $value; } elseif ('float' == $format) { return (double) $value; } elseif ('html' == $format) { return stripslashes($this->bridge->wp_filter_post_kses($value)); } } else { return strip_tags($value); } }