コード例 #1
0
 /**
  * @brief getAllThemes 获取全部可用主题
  *
  * @return array
  */
 public static function getAllThemes()
 {
     $themes = LogX::readDir(LOGX_THEME);
     $reArray = array();
     foreach ($themes as $key => $theme) {
         $themeName = str_replace(LOGX_THEME, '', $theme);
         if ($themeName[0] != '.' && file_exists($theme . '/index.php') && file_exists($theme . '/post.php') && file_exists($theme . '/page.php')) {
             $reArray[] = $themeName;
         }
     }
     return $reArray;
 }
コード例 #2
0
 /**
  * @brief getPlugins 获取所有可用的插件
  *
  * @return array
  */
 public static function getPlugins()
 {
     $plugins = LogX::readDir(LOGX_PLUGIN);
     $reArray = array();
     foreach ($plugins as $plugin) {
         $pluginName = str_replace(LOGX_PLUGIN, '', $plugin);
         if ($pluginName[0] != '.' && file_exists($plugin . '/' . $pluginName . '.php')) {
             $reArray[] = $pluginName;
         }
     }
     return $reArray;
 }