本文整理汇总了PHP中stylesheet_link_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP stylesheet_link_tag函数的具体用法?PHP stylesheet_link_tag怎么用?PHP stylesheet_link_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了stylesheet_link_tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_stylesheet_link_tag
function test_stylesheet_link_tag()
{
$this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="all" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source"));
$this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="all" rel="stylesheet" type="text/css"/>' . "\n" . '<link href="http://welaika.com/another_source.css" media="all" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source", "http://welaika.com/another_source.css"));
$this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="print" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source", array("media" => "print")));
$this->assertEqual('<link href="mocked_stylesheet_directory/assets/stylesheets/source.css" media="print" rel="stylesheet" type="text/css"/>' . "\n" . '<link href="https://welaika.com/another_source.css" media="print" rel="stylesheet" type="text/css"/>', stylesheet_link_tag("source", "https://welaika.com/another_source.css", array("media" => "print")));
}
示例2: roots_get_stylesheets
function roots_get_stylesheets()
{
$styles = '';
$styles .= stylesheet_link_tag('/style.css', 1);
$styles .= stylesheet_link_tag('/bootstrap.css', 1);
if (BOOTSTRAP_RESPONSIVE) {
$styles .= stylesheet_link_tag('/bootstrap-responsive.css', 1);
}
$styles .= stylesheet_link_tag('/app.css', 1);
if (is_child_theme()) {
$styles .= "\t<link rel=\"stylesheet\" href=\"" . get_stylesheet_uri() . "\">\n";
}
echo $styles;
}
示例3: xhtml_template
/**
* Inserta un documento XHTML antes de una salida en buffer
*
* @param string $template
*/
function xhtml_template($template = 'template')
{
print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Kumbia PHP Framework</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />';
print stylesheet_link_tag("style", 'use_variables: true');
kumbia::stylesheet_link_tags() . (print '</head>
<body class="' . $template . '">');
content();
print '
</body>
</html>';
}
示例4: roots_get_stylesheets
function roots_get_stylesheets()
{
global $roots_options;
$roots_css_framework = $roots_options['css_framework'];
$styles = '';
switch ($roots_css_framework) {
case 'blueprint':
$styles .= stylesheet_link_tag('/blueprint/screen.css');
break;
case '960gs_12':
case '960gs_16':
$styles .= stylesheet_link_tag('/960/reset.css');
$styles .= stylesheet_link_tag('/960/text.css', 1);
$styles .= stylesheet_link_tag('/960/960.css', 1);
break;
case '960gs_24':
$styles .= stylesheet_link_tag('/960/reset.css');
$styles .= stylesheet_link_tag('/960/text.css', 1);
$styles .= stylesheet_link_tag('/960/960_24_col.css', 1);
break;
case '1140':
$styles .= stylesheet_link_tag('/1140/1140.css');
break;
case 'adapt':
$styles .= stylesheet_link_tag('/adapt/master.css');
$styles .= "\t<noscript>\n";
$styles .= stylesheet_link_tag('/adapt/mobile.css', 1);
$styles .= "\t</noscript>\n";
break;
case 'foundation':
$styles .= stylesheet_link_tag('/foundation/globals.css');
$styles .= stylesheet_link_tag('/foundation/typography.css', 1);
$styles .= stylesheet_link_tag('/foundation/grid.css', 1);
$styles .= stylesheet_link_tag('/foundation/ui.css', 1);
$styles .= stylesheet_link_tag('/foundation/forms.css', 1);
$styles .= stylesheet_link_tag('/foundation/orbit.css', 1);
$styles .= stylesheet_link_tag('/foundation/reveal.css', 1);
$styles .= stylesheet_link_tag('/foundation/mobile.css', 1);
$styles .= stylesheet_link_tag('/foundation/app.css', 1);
break;
case 'less':
$styles .= stylesheet_link_tag('/less/less.css');
break;
case 'bootstrap':
$styles .= stylesheet_link_tag('/bootstrap/bootstrap.css');
break;
case 'bootstrap_less':
$styles .= stylesheet_link_tag_boostrap_less('/bootstrap/lib/bootstrap.less');
break;
}
if (class_exists('RGForms')) {
$styles .= "\t<link rel=\"stylesheet\" href=\"" . plugins_url() . "/gravityforms/css/forms.css\">\n";
}
if (is_child_theme()) {
$styles .= stylesheet_link_tag('/style.css', 1);
$styles .= "\t<link rel=\"stylesheet\" href=\"" . get_stylesheet_uri() . "\">\n";
} else {
$styles .= stylesheet_link_tag('/style.css', 1);
}
switch ($roots_css_framework) {
case 'blueprint':
$styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/blueprint/ie.css', 0, false) . "<![endif]-->\n";
break;
case '1140':
$styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/1140/ie.css', 0, false) . "<![endif]-->\n";
break;
case 'foundation':
$styles .= "\t<!--[if lt IE 9]>" . stylesheet_link_tag('/foundation/ie.css', 0, false) . "<![endif]-->\n";
break;
}
echo $styles;
}
示例5: stylesheet_link_tag
* It is also available through the world-wide-web at this URL:
* http://wiki.kumbiaphp.com/Licencia
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@kumbiaphp.com so we can send you a copy immediately.
*
* Este archivo debe ser incluido desde un controlador
* usando include "test/adapters.php"
*
* @category Kumbia
* @package Test
* @subpackage Flash
* @copyright Copyright (c) 2005-2015 Kumbia Team (http://www.kumbiaphp.com)
* @license http://wiki.kumbiaphp.com/Licencia New BSD License
*/
stylesheet_link_tag('style');
ob_start();
Flash::show('cuidado', 'Kumbia puede ser adictivo.');
flash::error('Test de flash::error');
flash::notice('Test de flash::notice');
flash::success('Test de flash::success');
flash::warning('Test de flash::warning');
flash::interactive('Test de flash::interactive');
flash::kumbia_error('Test de flash::kumbia_error');
$salida = ob_get_contents();
ob_end_clean();
$correcto = '<div class="flash_show cuidado">Kumbia puede ser adictivo.</div>
<div class="flash_show error_message">Test de flash::error</div>
<div class="flash_show notice_message">Test de flash::notice</div>
<div class="flash_show success_message">Test de flash::success</div>
<div class="flash_show warning_message">Test de flash::warning</div>
示例6: csrf_token
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Login">
<meta name="author" content="">
<meta name="csrf-token" content="<?php
echo csrf_token();
?>
">
<title><?php
echo isset($title) ? $title : 'Login';
?>
</title>
<?php
echo stylesheet_link_tag('platform/login');
?>
<?php
echo javascript_include_tag('platform/backend');
?>
<!--[if lt IE 9]>
<script src="/assets/platform/vendors/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
示例7: stylesheet_link_tag
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<title>Fresh Cupcake App</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<?php
echo stylesheet_link_tag("master");
?>
</head>
<body>
<?php
echo $content_for_layout;
?>
</body>
</html>
示例8: javascript_include_tag
?>
<?php
echo javascript_include_tag($js_file);
?>
<?php
}
?>
<?php
echo stylesheet_link_tag('main.css');
?>
<?php
foreach ($this->extra['css'] as $css_file) {
?>
<?php
echo stylesheet_link_tag($css_file);
?>
<?php
}
?>
</head>
<body>
<div id="page">
<?php
if (isset($this->session['user'])) {
?>
<div id="userBar">
<?php
echo _f('Connected as %s', array($this->session['user']));
示例9: javascript_include_tag
<?php
if (function_exists('javascript_include_tag')) {
?>
<?php
echo javascript_include_tag("jcrop/jquery.jcrop.min");
?>
<?php
echo javascript_include_tag("jcrop/jquery.jcrop.extras");
?>
<?php
echo javascript_include_tag("jcrop/jquery.color");
?>
<?php
echo stylesheet_link_tag('jcrop/jquery.jcrop');
}
/* Clase Jcrop
* Esta clase contiene métodos para recortar imagenes.
*
* Autor: Ramiro Vera(raalveco) y Carlos Lizaola(clizaola)
* Company: Amecasoft S.A. de C.V. (México)
* Fecha: 16/08/2011
*
* NOTA: Esta clase esta diseñada para funcionar como libreria en el Kumbia PHP Spirit 1.0
*
*/
class JCrop
{
public static function cortar($origen, $destino, $x, $y, $w, $h, $cuadro = true, $wf = 150, $hf = 150)
{
$jpeg_quality = 100;
示例10: assert_equal
assert_equal($attr, array('src="filename"', 'type="text/javascript"'));
});
});
describe("Helpers -> content_tag", function () {
it("returns html tag for DIV tag", function () {
$html = content_tag("div", "Div Tag");
assert_equal($html, "<div>Div Tag</div>");
});
});
describe("Helpers -> stylesheet_link_tag", function () {
it("returns css stylesheet html tag", function () {
$tag = stylesheet_link_tag("master");
assert_equal($tag, '<link href="/stylesheets/master.css" media="screen" rel="stylesheet" type="text/css" />');
});
it("merges attributes for stylesheet helper", function () {
$tag = stylesheet_link_tag("master", array("media" => "print"));
assert_equal($tag, '<link href="/stylesheets/master.css" media="print" rel="stylesheet" type="text/css" />');
});
});
describe("Helpers -> javascript_include_tag", function () {
it("create html tag for javascript tag", function () {
$tag = javascript_include_tag("master");
assert_equal($tag, '<script type="text/javascript" src="/javascripts/master.js"></script>');
});
});
describe("Helpers -> image_tag", function () {
it("returns html tag for image", function () {
$tag = image_tag("cupcake.png");
assert_equal($tag, '<img alt="cupcake" src="/images/cupcake.png" />');
});
it("it has image attributes", function () {
示例11: csrf_token
<meta name="description" content="">
<meta name="author" content="">
<meta name="csrf-token" content="<?php
echo csrf_token();
?>
">
<link rel="shortcut icon" href="/favicon.ico">
<title><?php
echo isset($title) ? $title : 'Codesleeve';
?>
</title>
<?php
echo stylesheet_link_tag('platform/backend');
?>
<?php
echo javascript_include_tag('platform/backend');
?>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<?php
echo render("platform::navigation.top");
示例12: roots_get_stylesheets
function roots_get_stylesheets()
{
global $roots_options;
$roots_css_framework = $roots_options['css_framework'];
$template_uri = get_template_directory_uri();
$styles = '';
if ($roots_css_framework === 'blueprint') {
$styles .= stylesheet_link_tag('/blueprint/screen.css');
} elseif ($roots_css_framework === '960gs_12' || $roots_css_framework === '960gs_16') {
$styles .= stylesheet_link_tag('/960/reset.css');
$styles .= stylesheet_link_tag('/960/text.css', 1);
$styles .= stylesheet_link_tag('/960/960.css', 1);
} elseif ($roots_css_framework === '960gs_24') {
$styles .= stylesheet_link_tag('/960/reset.css');
$styles .= stylesheet_link_tag('/960/text.css', 1);
$styles .= stylesheet_link_tag('/960/960_24_col.css', 1);
} elseif ($roots_css_framework === '1140') {
$styles .= stylesheet_link_tag('/1140/1140.css');
} elseif ($roots_css_framework === 'adapt') {
$styles .= stylesheet_link_tag('/adapt/master.css');
$styles .= "\t<noscript>\n";
$styles .= stylesheet_link_tag('/adapt/mobile.css', 1);
$styles .= "\t</noscript>\n";
} elseif ($roots_css_framework === 'less') {
$styles .= stylesheet_link_tag('/less/less.css');
}
if (class_exists('RGForms')) {
$styles .= "\t<link rel=\"stylesheet\" href=\"" . plugins_url() . "/gravityforms/css/forms.css\">\n";
}
$styles .= stylesheet_link_tag('/style.css', 1);
if ($roots_css_framework === 'blueprint') {
$styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/blueprint/ie.css', 0, false) . "<![endif]-->\n";
} elseif ($roots_css_framework === '1140') {
$styles .= "\t<!--[if lt IE 8]>" . stylesheet_link_tag('/1140/ie.css', 0, false) . "<![endif]-->\n";
}
echo $styles;
}
示例13: csrf_token
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Login">
<meta name="author" content="">
<meta name="csrf-token" content="<?php
echo csrf_token();
?>
">
<title><?php
echo isset($title) ? $title : 'Login';
?>
</title>
<?php
echo stylesheet_link_tag('platform/pages');
?>
<?php
echo javascript_include_tag('platform/pages');
?>
<!--[if lt IE 9]>
<script src="/assets/platform/vendors/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
<?php
echo render("platform::layouts.partials.messages");
?>
示例14: htmlentities
?>
</h3>
<?php
echo $description;
?>
<br />
<h2>Helpers:</h2>
<p>
<strong>stylesheet_link_tag</strong><br />
Include any stylesheets from the stylesheets directory:<br />
Example: <strong>stylesheet_link_tag("master")</strong> <br />
# => <?php
echo htmlentities(stylesheet_link_tag("master"));
?>
</p>
<p>
<strong>content_tag</strong><br />
Print an html tag:<br />
Exmaple: <strong>content_for("p", "Hello World")</strong> <br />
# => <?php
echo htmlentities(content_tag("p", "Hello World"));
?>
</p>
<p>
<strong>image_tag</strong><br />
Generates an img tag:<br />
示例15: testStylesheet_link_tag_function
/**
* Test stylesheet_link_tag() function
*
* Test the {@link stylesheet_link_tag()} function in procedural
* file {@link asset_tag_helper.php}
*/
public function testStylesheet_link_tag_function()
{
$this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' . ' media="screen" rel="Stylesheet"' . ' type="text/css" />' . "\n", stylesheet_link_tag("foo"));
}