예제 #1
0
 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;
 }
예제 #2
0
function ya_optionsx()
{
    return YA_Config::setVariables(wp_parse_args(get_option('ya_options'), ya_default_options()));
}