本文整理汇总了PHP中Stylesheet::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Stylesheet::add方法的具体用法?PHP Stylesheet::add怎么用?PHP Stylesheet::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stylesheet
的用法示例。
在下文中一共展示了Stylesheet::add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<link rel="stylesheet" href="<?php
echo Site::url();
?>
/public/assets/css/messenger.css" type="text/css" />
<link rel="stylesheet" href="<?php
echo Site::url();
?>
/public/assets/css/messenger-theme-flat.css" type="text/css" />
<?php
Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2);
?>
<?php
Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3);
?>
<?php
Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5);
?>
<?php
Stylesheet::load();
?>
<!-- JavaScripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="<?php
echo Site::url();
?>
/public/assets/js/bootstrap.min.js"></script>
<script src="<?php
echo Site::url();
?>
/public/assets/js/messenger.min.js"></script>
示例2: main
<?php
// Add Plugin Javascript
Stylesheet::add('public/assets/css/daterangepicker-bs3.css', 'backend', 11);
Javascript::add('public/assets/js/moment.min.js', 'backend', 11);
Javascript::add('public/assets/js/daterangepicker.js', 'backend', 12);
Javascript::add('plugins/box/dashboard/js/ganalytics.js', 'backend', 13);
/**
* Dashboard admin class
*/
class DashboardAdmin extends Backend
{
/**
* Main Dashboard admin function
*/
public static function main()
{
// set/update google analytics settings
if (Request::post('ga_settings_update')) {
if (Security::check(Request::post('csrf'))) {
// client id
$ga_client_id = trim(Request::post('ga_client_id'));
if (!empty($ga_client_id)) {
$opt_client_id = Option::get('ga_client_id');
if (empty($opt_client_id)) {
Option::add('ga_client_id', $ga_client_id);
} else {
Option::update('ga_client_id', $ga_client_id);
}
}
// API key
示例3:
* Events plugin admin
*
* Provides CRUD for events and different output possibilities for event lists
*
* @package Monstra
* @subpackage Plugins
* @author Andreas Müller | devmount <mail@devmount.de>
* @license MIT
* @link https://github.com/devmount-monstra/events
*
*/
// Add plugin styles and scripts
Stylesheet::add('plugins/events/css/events.admin.css', 'backend', 11);
Javascript::add('plugins/events/js/events.admin.js', 'backend', 11);
// lib: Image Picker http://rvera.github.io/image-picker/
Stylesheet::add('plugins/events/lib/image-picker/image-picker.css', 'backend', 11);
Javascript::add('plugins/events/lib/image-picker/image-picker.js', 'backend', 11);
// Admin Navigation: add new item
Navigation::add(__('Events', 'events'), 'content', 'events', 10);
// Add action on admin_pre_render hook
Action::add('admin_pre_render', 'EventsAdmin::_getAjaxData');
// register repository classes
require_once 'repositories/repository.events.php';
require_once 'repositories/repository.categories.php';
require_once 'repositories/repository.locations.php';
/**
* Events class
*
*/
class EventsAdmin extends Backend
{
示例4:
<!-- Google+ Snippets -->
<meta itemprop="url" content="<?php
echo Url::current();
?>
">
<meta itemprop="name" content="<?php
echo Site::title();
?>
| <?php
echo Site::name();
?>
">
<!-- Styles -->
<?php
Stylesheet::add('public/assets/css/app.css', 'frontend', 2);
?>
<?php
Stylesheet::load();
?>
<?php
Action::run('theme_header');
?>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
<![endif]-->
<!-- Fav-icons -->
示例5: main
<?php
// Add Plugin Javascript
Stylesheet::add('plugins/box/filesmanager/css/style.css', 'backend', 11);
Javascript::add('plugins/box/filesmanager/js/fileuploader.js', 'backend', 11);
Javascript::add('plugins/box/filesmanager/js/filesmanager.js', 'backend', 11);
// Add plugin navigation link
Navigation::add(__('Files', 'filesmanager'), 'content', 'filesmanager', 3);
/**
* Filesmanager Admin Class
*/
class FilesmanagerAdmin extends Backend
{
/**
* Main function
*/
public static function main()
{
// Array of forbidden types
$forbidden_types = array('html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'sh', 'ksh', 'bsh', 'c', 'htaccess', 'htpasswd', 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl', 'empty');
// Array of image types
$image_types = array('jpg', 'png', 'bmp', 'gif', 'tif');
// Get Site url
$site_url = Option::get('siteurl');
// Init vars
if (Request::get('path')) {
$path = Request::get('path');
} else {
$path = 'uploads/';
}
// Add slash if not exists
示例6:
">
<meta itemprop="name" content="<?php
echo Site::title();
?>
| <?php
echo Site::name();
?>
">
<!-- Styles -->
<link rel="stylesheet" href="<?php
echo Site::url();
?>
/public/assets/css/bootstrap.css" type="text/css" />
<?php
Stylesheet::add('public/themes/default/css/default.css', 'frontend', 2);
?>
<?php
Stylesheet::load();
?>
<!-- JavaScripts -->
<?php
Javascript::add('public/assets/js/jquery.min.js', 'frontend', 1);
?>
<?php
Javascript::add('public/assets/js/bootstrap.min.js', 'frontend', 2);
?>
<?php
Javascript::load();
?>