Exemple #1
0
 /**
  * The Theme object can be created/obtained via this
  * method - this prevents unnecessary work in rebuilding the object and
  * querying to construct a list of categories, etc.
  *
  * @return object $instance Theme
  */
 public static function instance()
 {
     if (false === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemple #2
0
 /**
  * The Theme object can be created/obtained via this
  * method - this prevents unnecessary work in rebuilding the object and
  * querying to construct a list of categories, etc.
  *
  * @return Theme
  */
 public static function instance()
 {
     $class = __CLASS__;
     if (false === self::$object) {
         self::$object = new $class();
     }
     return self::$object;
 }
Exemple #3
0
 /**
  * The Theme object can be created/obtained via this
  * method - this prevents unnecessary work in rebuilding the object and
  * querying to construct a list of categories, etc.
  *
  * @return Theme
  */
 public static function instance($force_meta_update = false)
 {
     $class = __CLASS__;
     if (false === self::$object && $force_meta_update) {
         self::$object = new $class(true);
         set_site_transient('ghu_theme', self::$object, self::$hours * HOUR_IN_SECONDS);
     }
     return self::$object;
 }