function vp_option($key, $default = null)
 {
     $vp_options = VP_Option::get_pool();
     if (empty($vp_options)) {
         return $default;
     }
     $keys = explode('.', $key);
     $temp = NULL;
     foreach ($keys as $idx => $key) {
         if ($idx == 0) {
             if (array_key_exists($key, $vp_options)) {
                 $temp = $vp_options[$key];
                 $temp = $temp->get_options();
             } else {
                 return $default;
             }
         } else {
             if (is_array($temp) and array_key_exists($key, $temp)) {
                 $temp = $temp[$key];
             } else {
                 return $default;
             }
         }
     }
     return $temp;
 }
Exemple #2
0
 public static function enqueue_admin_styles($hook_suffix)
 {
     if ($hook_suffix === self::$options->get_hook_suffix()) {
         wp_tiles()->enqueue_styles();
     }
 }