Ejemplo n.º 1
0
 /**
  * Count our plugins (but only once) by counting the top level folders in the
  * mu-plugins dir. If it's more or less than last time, update the cache.
  */
 private function countPlugins()
 {
     if (isset(self::$count)) {
         return self::$count;
     }
     $count = count(glob(WPMU_PLUGIN_DIR . '/*/', GLOB_ONLYDIR | GLOB_NOSORT));
     if (!isset(self::$cache['count']) || $count != self::$cache['count']) {
         self::$count = $count;
         $this->updateCache();
     }
     return self::$count;
 }