當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GDSRHelper::create_folders方法代碼示例

本文整理匯總了PHP中GDSRHelper::create_folders方法的典型用法代碼示例。如果您正苦於以下問題:PHP GDSRHelper::create_folders方法的具體用法?PHP GDSRHelper::create_folders怎麽用?PHP GDSRHelper::create_folders使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GDSRHelper的用法示例。


在下文中一共展示了GDSRHelper::create_folders方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: create_folders

 /**
  * Creates extra folders.
  *
  * @return bool cache folder exists and is writeable
  */
 function create_folders($version)
 {
     if (is_dir(STARRATING_XTRA_PATH)) {
         if (is_writable(STARRATING_XTRA_PATH)) {
             if (!is_dir(STARRATING_CACHE_PATH)) {
                 mkdir(STARRATING_CACHE_PATH, 0755);
             }
             if (!is_dir(STARRATING_XTRA_PATH . "stars/")) {
                 mkdir(STARRATING_XTRA_PATH . "stars/", 0755);
             }
             if (!is_dir(STARRATING_XTRA_PATH . "trends/")) {
                 mkdir(STARRATING_XTRA_PATH . "trends/", 0755);
             }
             if (!is_dir(STARRATING_XTRA_PATH . "css/")) {
                 mkdir(STARRATING_XTRA_PATH . "css/", 0755);
             }
             if (!file_exists(STARRATING_XTRA_PATH . "css/rating.css")) {
                 copy(STARRATING_PATH . "css/rating.css", STARRATING_XTRA_PATH . "css/rating.css");
             }
         }
     } else {
         $path = WP_CONTENT_DIR;
         if (is_writable($path)) {
             mkdir(STARRATING_XTRA_PATH, 0755);
             GDSRHelper::create_folders($version);
         } else {
             return false;
         }
     }
     return is_dir(STARRATING_CACHE_PATH) && is_writable(STARRATING_CACHE_PATH);
 }
開發者ID:sangpena,項目名稱:appflex.mobi,代碼行數:36,代碼來源:elements.php

示例2: init_specific_pages

 /**
  * Initialization of plugin panels
  */
 function init_specific_pages()
 {
     if ($this->admin_plugin_page == "settings") {
         $gdsr_options = $this->o;
         include $this->plugin_path . "code/adm/save_settings.php";
         $this->o = $gdsr_options;
     }
     if ($this->admin_plugin_page == "gfx-page") {
         $gdsr_options = $this->o;
         $ginc = $this->ginc;
         $ginc_sizes = $this->ginc[0];
         $ginc_stars = $this->ginc[1];
         $ginc_sizes_thumb = $this->ginc[2];
         $ginc_stars_thumb = $this->ginc[3];
         include $this->plugin_path . "code/adm/save_gfx.php";
         $this->o = $gdsr_options;
         $this->ginc = $ginc;
     }
     if ($this->admin_plugin_page == "multi-sets" || $this->admin_plugin_page == "t2") {
         $this->load_corrections();
     }
     if ($this->admin_plugin) {
         $this->load_colorbox();
         $this->load_jquery();
         $this->safe_mode = gdFunctionsGDSR::php_in_safe_mode();
         if (!$this->safe_mode) {
             $this->extra_folders = $this->o["cache_forced"] == 1 || GDSRHelper::create_folders($this->wp_version);
         }
     }
 }
開發者ID:TheReaCompany,項目名稱:pooplog,代碼行數:33,代碼來源:class.php

示例3: init

 /**
  * Main init method executed as wordpress action 'init'.
  */
 function init()
 {
     $this->init_uninstall();
     define('STARRATING_ENCODING', $this->o["encoding"]);
     if (isset($_GET["page"])) {
         if (substr($_GET["page"], 0, 14) == "gd-star-rating") {
             $this->admin_plugin = true;
             $this->admin_plugin_page = substr($_GET["page"], 15);
         }
     }
     $this->init_operations();
     if (!is_admin()) {
         $this->is_bot = GDSRHelper::detect_bot($_SERVER['HTTP_USER_AGENT']);
         $this->is_ban = GDSRHelper::detect_ban();
         $this->render_wait_article();
         if ($this->o["comments_active"] == 1) {
             $this->render_wait_comment();
         }
         if ($this->o["multis_active"] == 1) {
             $this->render_wait_multis();
         }
     } else {
         $this->cache_cleanup();
     }
     if ($this->admin_plugin_page == "settings-page") {
         $gdsr_options = $this->o;
         include $this->plugin_path . "code/gd-star-settings.php";
         $this->o = $gdsr_options;
     }
     wp_enqueue_script('jquery');
     if ($this->admin_plugin) {
         if ($this->wp_version >= 26) {
             add_thickbox();
         } else {
             wp_enqueue_script("thickbox");
         }
         $this->safe_mode = gdFunctionsGDSR::php_in_safe_mode();
         if (!$this->safe_mode) {
             $this->extra_folders = GDSRHelper::create_folders($this->wp_version);
         }
     }
     $this->l = get_locale();
     if (!empty($this->l)) {
         $moFile = dirname(__FILE__) . "/languages/gd-star-rating-" . $this->l . ".mo";
         if (@file_exists($moFile) && is_readable($moFile)) {
             load_textdomain('gd-star-rating', $moFile);
         }
     }
     $this->is_cached = $this->o["cache_active"];
     $this->is_ie6 = is_msie6();
     $this->custom_actions('init');
     if (is_admin() && $this->o["mur_review_set"] == 0) {
         $set = GDSRDBMulti::get_multis(0, 1);
         if (count($set) > 0) {
             $this->o["mur_review_set"] = $set[0]->multi_id;
             update_option('gd-star-rating', $this->o);
         }
     }
     if (!is_admin() && !is_feed()) {
         $this->rendering_sets = GDSRDBMulti::get_multisets_for_auto_insert();
         if (!is_array($this->rendering_sets)) {
             $this->rendering_sets = array();
         }
     } else {
         $this->rendering_sets = array();
     }
 }
開發者ID:alvaropereyra,項目名稱:shrekcms,代碼行數:70,代碼來源:gd-star-rating.php


注:本文中的GDSRHelper::create_folders方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。