本文整理汇总了PHP中assets函数的典型用法代码示例。如果您正苦于以下问题:PHP assets函数的具体用法?PHP assets怎么用?PHP assets使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了assets函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bs_header
function bs_header($page_identification = "")
{
$styles = [assets('css/app.min.css'), assets('vendor/skins/' . Option::get('color_scheme') . '.min.css')];
if ($page_identification !== "") {
$styles[] = assets("css/{$page_identification}.css");
}
foreach ($styles as $style) {
echo "<link rel=\"stylesheet\" href=\"{$style}\">";
}
echo '<style>' . Option::get("custom_css") . '</style>';
$extra_contents = [];
Event::fire(new App\Events\RenderingHeader($extra_contents));
echo implode(PHP_EOL, $extra_contents);
}
示例2: thumbnail
public static function thumbnail()
{
$result = '';
list(, $caller) = debug_backtrace(false);
$class = strtolower($caller['class']);
if (strpos($class, '_page_')) {
$class = str_replace('_page_type', '', $class);
$class = str_replace('_', '-', $class);
$result = assets("images/pages/{$class}.png");
} elseif (strpos($class, '_module_')) {
$class = str_replace('_module_type', '', $class);
$class = str_replace('_', '-', $class);
$result = assets("images/modules/{$class}.png");
} else {
}
return $result;
}
示例3: enqueueScripts
public static function enqueueScripts()
{
$version = time();
if (!WP_DEBUG) {
$theme = wp_get_theme();
$version = $theme->version;
}
wp_enqueue_style('modular-admin-vendor-css', \assets('css/vendor.css'), [], $version);
wp_enqueue_style('modular-admin-css', \assets('css/app.css'), [], $version);
wp_enqueue_script('modular-admin-vendor-js', \assets('js/vendor.js'), [], $version, true);
wp_enqueue_script('modular-admin-js', \assets('js/app.js'), [], $version, true);
wp_enqueue_script('vue-js', \assets('js/vue.min.js'), [], $version, true);
if (is_user_logged_in()) {
// logged in specific scripts
} else {
$data = ['waiting_message' => __('Please, wait for response...', 'intra'), 'ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('gatekeeper')];
wp_enqueue_script('unauthenticated-js', \assets('js/unauthenticated.js'), [], $version, true);
wp_localize_script('unauthenticated-js', 'wpdata', $data);
}
}
示例4: generar_files
public static function generar_files($file_data = false)
{
/*
** URLS
*/
$style_php_path = Generador_style_css::get_master_file($file_data, true);
$style_php_server_url = assets(false) . '/' . $file_data['folder'] . '/' . $file_data['file'] . '.php';
$style_backup_path = Generador_style_css::get_file_backup($file_data, true);
$style_css_path = Generador_style_css::get_final_file($file_data, true);
/*
** ARCHIVOS
*/
$style_php_file = file_get_contents($style_php_path);
/*
** COMPILAR CSS
** NECESITAMOS PEDIRLE AL SERVIDOR LA PÁGINA PROCESADA
*/
$style_php_server = file_get_contents($style_php_server_url);
/*
** ACTUALIZAMOS EL BACKUP
*/
file_put_contents($style_backup_path, $style_php_file);
file_put_contents($style_css_path, $style_php_server);
}
示例5: assets_e
function assets_e($file = '')
{
echo assets($file);
}
示例6: assets
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>krokodile</title>
<link rel="stylesheet" type="text/css" href="<?php
echo assets();
?>
css/style.css">
<link rel="stylesheet" type="text/css" href="<?php
echo assets();
?>
css/semantic.css">
</head>
<body>
<h3>la soupe aux KROKOS </h3>
示例7: array
<?php
$this->load->view('v_header', array('nav_artikel' => "active"));
?>
<script type="text/javascript" src='<?php
echo assets() . "js/v_artikel.js";
?>
'></script>
<div class="wrap-content">
<div id="global-notification">
<?php
$success = $this->session->flashdata('success');
$error = $this->session->flashdata('error');
if ($success != null) {
if (count($success) > 0) {
?>
<div class="alert alert-success text-center" role="alert">
<ul>
<?php
foreach ($success as $value) {
echo "<li>" . $value . "</li>";
}
?>
</ul>
</div>
<?php
}
}
示例8: assets
</h1>
</th>
<th valign="middle">
<?php
if ($guild->hasLogo()) {
?>
<img src="<?php
echo assets('storage/guild_images/' . $guild->hasLogo());
?>
" width="64" height="64">
<?php
} else {
?>
<img src="<?php
echo assets('storage/guild_images/default_guild.gif');
?>
" width="64" height="64">
<?php
}
?>
</th>
</tr>
<tr class="transparent noborderpadding">
<td colspan="3">
<p><?php
echo nl2br(e(lines($guild->description(), 5)));
?>
</p>
</td>
示例9: assets
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Foo</title>
<link rel="stylesheet" href="<?php
echo assets('assets/css/styles.css');
?>
" charset="utf-8">
</head>
<body>
<div class="header">
<div class="container">
<header>
<h1 id="title"><a href="#">Blogku</a></h1>
<nav id="primary-nav" class="inline">
<ul>
<li><a href="<?php
echo $router->generate('home');
?>
">Beranda</a></li>
<li><a href="<?php
echo $router->generate('about');
?>
">Tentang</a></li>
<li><a href="<?php
echo $router->generate('contact');
?>
">Kontak</a></li>
</ul>
示例10: theme_styles
function theme_styles()
{
$deps = load_styles_dependencies();
wp_enqueue_style('styles', assets('css/index.css'), $deps, false, 'all');
depend_style($deps, 'glide', assets('css/vendors/glide.css'));
depend_style($deps, 'slick-css', assets('css/vendors/slick.css'));
depend_style($deps, 'slick-theme-css', assets('css/vendors/slick-theme.css'));
}
示例11: assets
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="<?php
echo assets('styles/bootstrap.min.css');
?>
">
<link rel="stylesheet" href="<?php
echo assets('styles/endless.min.css');
?>
">
</head>
<body>
示例12: e
" rel="stylesheet">
<link href="<?php
echo e(assets("/css/styles.css"));
?>
" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
echo $__env->make("nav", array_except(get_defined_vars(), array('__data', '__path')))->render();
?>
<?php
echo $__env->yieldContent("content");
?>
<script src="<?php
echo e(assets("/js/bootstrap.js"));
?>
"></script>
</body>
</html>
示例13: enqueue_styles_and_scripts
public function enqueue_styles_and_scripts()
{
global $post_type;
if (isset($_GET['page']) && in_array($_GET['page'], array('booking-system', 'manage-bookings', 'edit-booking', 'guest-calendar')) || 'room' == $post_type) {
if (isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] == 'edit') {
return;
}
wp_enqueue_style('admin-style', assets('style/admin.css'));
wp_enqueue_style('jquery-style', assets('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.css'));
wp_enqueue_script('jquery-ui-datepicker');
wp_enqueue_script('jquery-ui-tooltip');
wp_enqueue_script('chart-script', assets('vendor/Chart.min.js'), array('jquery'), true, false);
wp_enqueue_script('admin-script', assets('js/admin.js'), array('chart-script', 'jquery'), true, true);
wp_localize_script('admin-script', 'BDR', array('AjaxUrl' => admin_url('admin-ajax.php'), 'assets' => assets(''), 'bookings' => get_booking_calendar()));
}
}
示例14: assets
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php
echo $title;
?>
</title>
<link rel="stylesheet" href="<?php
echo assets('styles/global.css');
?>
">
</head>
<body class="overflow-hidden">
示例15: config
?>
"><a href="<?php
echo config('social', 'facebook.url');
?>
">Facebook</a></blockquote></div></div>
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="footer">
Powered by CornexAAC - <?php
echo config('app', 'version');
?>
</div>
</div>
<script src="<?php
echo assets('assets/js/jquery.min.js');
?>
"></script>
<script src="<?php
echo assets('assets/js/bootstrap.min.js');
?>
"></script>
</body>
</html>