本文整理汇总了PHP中theme::register_style方法的典型用法代码示例。如果您正苦于以下问题:PHP theme::register_style方法的具体用法?PHP theme::register_style怎么用?PHP theme::register_style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类theme
的用法示例。
在下文中一共展示了theme::register_style方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// Theme Autoloader
require_once __DIR__ . '/includes/autoload.php';
// Alias to our custom theme class
// Alternatively, you could just extend \projectcleverweb\lastautoindex\theme
class theme extends \projectcleverweb\lastautoindex\themes\default_theme\main
{
}
// Run our custom init
theme::init();
// Register all scripts & styles (you need to queue them if you want to use them on a page)
// Styles - theme::register_style($id, $url [, $options = array('order' => 1000)])
theme::register_style('font-awesome', theme::$styles_uri . '/font-awesome.min.css', array('order' => 600));
theme::register_style('webicons', theme::$styles_uri . '/webicons.min.css', array('order' => 700));
theme::register_style('semantic', theme::$styles_uri . '/semantic-ui/semantic.min.css', array('order' => 800));
theme::register_style('highlight-js', theme::$styles_uri . '/highlight.js/github.min.css', array('order' => 900));
theme::register_style('readme', theme::$styles_uri . '/readme.css');
theme::register_style('main', theme::$styles_uri . '/main.css', array('order' => 1500));
// Scripts - theme::register_script($id, $url [, $options = array('order' => 1000)])
theme::register_script('jquery', theme::$scripts_uri . '/jquery-2.1.3.min.js', array('order' => 500));
theme::register_script('modernizr', theme::$scripts_uri . '/modernizr-2.8.3.min.js', array('order' => 600));
theme::register_script('moustrap', theme::$scripts_uri . '/mousetrap.min.js', array('order' => 700));
theme::register_script('highlight-js', theme::$scripts_uri . '/highlight.pack.min.js', array('order' => 800));
theme::register_script('semantic', theme::$scripts_uri . '/semantic.min.js', array('order' => 900));
theme::register_script('tablesort', theme::$scripts_uri . '/jquery.tablesort.min.js');
theme::register_script('main', theme::$scripts_uri . '/main.js', array('order' => 1500));
// Add special cases for when trying to login or install
if (isset($_GET['login']) && theme::$config['allow_login']) {
theme::use_part('login', 'template', 'index');
} elseif (isset($_GET['install']) && defined('LAI_INSTALLED') && LAI_INSTALLED === FALSE) {
theme::use_part('install', 'template', 'index');
}