本文整理汇总了PHP中body_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP body_tag函数的具体用法?PHP body_tag怎么用?PHP body_tag使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了body_tag函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testBodyTagWithFilter
public function testBodyTagWithFilter()
{
$attributes = array('id' => 'my-id', 'class' => 'my-class');
$defaultHtml = "<body id=\"my-id\" class=\"my-class\">\n";
$this->assertEquals($defaultHtml, body_tag($attributes));
add_filter('body_tag_attributes', array($this, 'bodyTagAttributesFilter'));
$filteredHtml = "<body id=\"my-id\" class=\"my-class new-class\">\n";
$this->assertEquals($filteredHtml, body_tag($attributes));
}
示例2: head_css
echo head_css();
?>
<!-- Need more JavaScript files? Include them here -->
<?php
queue_js_file('lib/bootstrap.min');
queue_js_file('globals');
echo head_js();
?>
<!--[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>
<?php
echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass));
?>
<?php
fire_plugin_hook('public_body', array('view' => $this));
?>
<!-- <header>
<div class="container">
<?php
fire_plugin_hook('public_header', array('view' => $this));
?>
<h1 class="site-title text-center"><?php
echo link_to_home_page(theme_logo());
?>
</h1>
</div>
示例3: css
echo css('lib/font-awesome-4/font-awesome.min.css');
echo css('lib/google-code-prettify/prettify.css');
echo css('lib/common/common.min.css');
echo css('site_example.css');
file_partial('css');
template_partial('css');
echo js('lib/phpjs/phpjs.min.js');
echo js_platform();
echo js_selectivizr();
echo js_modernizr();
echo js_respond();
echo js_jquery();
echo js('lib/jquery-json/jquery.json.js');
template_partial('head');
echo head_close_tag();
echo body_tag('id="page-top"');
?>
<!-- Wrap all page content here -->
<div id="wrap">
<?php
echo Modules::run('main_menu_widget');
echo noscript();
echo unsupported_browser();
?>
<!-- Begin page content -->
<div class="container" id="content-container">
<?php
template_body();
?>
示例4: html_body_begin
public function html_body_begin()
{
return body_tag($this->get_attribute(0));
}