Beispiel #1
0
 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));
 }
Beispiel #2
0
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>
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();
?>
 public function html_body_begin()
 {
     return body_tag($this->get_attribute(0));
 }