public static function setVariables($vars) { if (is_null(self::$instance)) { self::$instance = new YA_Config(); //self::$instance->vars = (array)$vars; foreach ((array) $vars as $field => $val) { self::$instance->{$field} = $val; } } return self::$instance; }
function ya_optionsx() { return YA_Config::setVariables(wp_parse_args(get_option('ya_options'), ya_default_options())); }