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


PHP gpOutput::CacheLess方法代碼示例

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


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

示例1: css

 /**
  * Add a css file to the page
  * @since gpEasy 4.0
  * @param string $file The path of the css file relative to the addon folder
  * @param bool $combine Set to false to keep the file from being combined with other css files
  */
 static function css($file, $combine = true)
 {
     global $page;
     $file = common::WinPath($file);
     if ($combine) {
         $page->css_admin[] = self::$current['code_folder_part'] . '/' . ltrim($file, '/');
         return self::$current['code_folder_part'] . '/' . ltrim($file, '/');
     }
     //less file
     if (substr($file, -5) === '.less') {
         $full_path = self::$current['code_folder_full'] . '/' . ltrim($file, '/');
         $path = gpOutput::CacheLess($full_path);
     } else {
         $path = self::$current['code_folder_part'] . '/' . ltrim($file, '/');
     }
     $page->head .= "\n" . '<link rel="stylesheet" type="text/css" href="' . common::GetDir($path) . '"/>';
     return $path;
 }
開發者ID:VTAMAGNO,項目名稱:gpEasy-CMS,代碼行數:24,代碼來源:Plugins.php

示例2: LayoutStyleFiles

 /**
  * Return a list of css files used by the current layout
  *
  */
 static function LayoutStyleFiles()
 {
     global $page, $dataDir;
     $files = array();
     $custom_file = $dataDir . '/data/_layouts/' . $page->gpLayout . '/custom.css';
     //css file
     if (file_exists($page->theme_dir . '/' . $page->theme_color . '/style.css')) {
         $files[] = rawurldecode($page->theme_path) . '/style.css';
         if ($page->gpLayout && file_exists($custom_file)) {
             $files[] = gpOutput::CacheLess($custom_file);
         }
         return $files;
     }
     //less file
     $files[] = $page->theme_dir . '/' . $page->theme_color . '/style.less';
     //variables.less
     $var_file = $page->theme_dir . '/' . $page->theme_color . '/variables.less';
     if (file_exists($var_file)) {
         $files[] = $var_file;
     }
     if ($page->gpLayout && file_exists($custom_file)) {
         $files[] = $custom_file;
     }
     $files = array(gpOutput::CacheLess($files));
     return $files;
 }
開發者ID:Bomberus,項目名稱:gpEasy-CMS,代碼行數:30,代碼來源:gpOutput.php

示例3: PrepareLess

 static function PrepareLess()
 {
     global $dataDir;
     $less_files = $dataDir . '/include/css/admin.less';
     gpOutput::CacheLess($less_files);
 }
開發者ID:VTAMAGNO,項目名稱:gpEasy-CMS,代碼行數:6,代碼來源:install.php


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