本文整理汇总了PHP中roots_display_sidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP roots_display_sidebar函数的具体用法?PHP roots_display_sidebar怎么用?PHP roots_display_sidebar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了roots_display_sidebar函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: roots_sidebar_body_class
/**
* Add body class if sidebar is active
*/
function roots_sidebar_body_class($classes)
{
if (roots_display_sidebar()) {
$classes[] = 'sidebar-primary';
}
return $classes;
}
示例2: ciGetContainerClass
function ciGetContainerClass()
{
$fullWidthContainerSpecified = get_option('full_width_container', true);
// Override with GET parms
if (isset($_GET['layout']) && $_GET['layout'] == "full") {
$fullWidthContainerSpecified = true;
} else {
if (isset($_GET['layout']) && $_GET['layout'] == "normal") {
$fullWidthContainerSpecified = false;
}
}
$needsFullWidthContainer = $fullWidthContainerSpecified && !roots_display_sidebar();
$containerClass = "container";
if ($needsFullWidthContainer) {
$containerClass .= "-fluid";
}
if ($fullWidthContainerSpecified) {
$containerClass .= " pseudo-fluid";
}
if (get_option('navbar_fixed', false)) {
$containerClass .= " fixed-navbar";
}
if (get_option("full_screen_image_bg")) {
$containerClass .= " has-bg-img";
}
if (ciGetNormalizedMeta('make_fancy_landing', false)) {
$containerClass .= " fancy-landing";
}
$containerClass .= " text-align-" . ciGetNormalizedMeta('alignment', 'left');
return $containerClass;
}
示例3: roots_main_class
function roots_main_class()
{
if (roots_display_sidebar()) {
$class = 'span8';
} else {
$class = 'span12';
}
return $class;
}
示例4: roots_main_class
/**
* .main classes
*/
function roots_main_class()
{
if (roots_display_sidebar()) {
// Classes on pages with the sidebar
$class = 'with-sidebar';
} else {
$class = '';
}
echo apply_filters('roots/main_class', $class);
}
示例5: roots_main_class
/**
* .main classes
*/
function roots_main_class()
{
if (roots_display_sidebar()) {
// Classes on pages with the sidebar
$class = 'col-sm-8 col-md-8 col-md-push-4 col-sm-push-4';
} else {
// Classes on full width pages
$class = 'col-xs-12 col-sm-12 col-md-12';
}
return $class;
}
示例6: roots_main_class
/**
* .main classes
*/
function roots_main_class() {
if (roots_display_sidebar()) {
// Classes on pages with the sidebar
$class = 'small-12 medium-8';
} else {
// Classes on full width pages
$class = 'small-12';
}
return apply_filters('roots/main_class', $class);
}
示例7: roots_main_class
/**
* .main classes
*/
function roots_main_class()
{
if (roots_display_sidebar()) {
// Classes on pages with the sidebar
$class = 'col-sm-12 col-md-10';
} else {
// Classes on full width pages
$class = 'col-sm-12';
}
return apply_filters('roots/main_class', $class);
}
示例8: get_template_part
<?php
get_template_part('templates/listen-live');
?>
</section>
</div>
<div class="content row">
<div class="main <?php
echo roots_main_class();
?>
" role="main">
<?php
include roots_template_path();
?>
</div><!-- /.main -->
<?php
if (roots_display_sidebar()) {
?>
<aside class="sidebar <?php
echo roots_sidebar_class();
?>
" role="complementary">
<div class="hidden-xs studio-sponsor">
<?php
echo adrotate_group(14);
?>
</div>
<?php
include roots_sidebar_path();
?>
</aside><!-- /.sidebar -->
<?php
示例9: get_template_part
if ($config->isglobal) {
if (is_page('angel-investor') || is_page('entrepreneurs') || is_page('innovators') || is_page('job-seekers') || is_page('mentorsadvisors') || is_page('service-providers') || is_page('suspended-user')) {
get_template_part('templates/header-profile-types');
} else {
get_template_part('templates/header-global-landing-page');
}
} else {
get_template_part('templates/header-landing-page');
}
} else {
get_template_part('templates/header-wrap');
}
?>
<?php
if (!get_query_var('idea_slug', false) && roots_display_sidebar()) {
?>
<?php
include roots_sidebar_path();
?>
<?php
}
?>
<?php
include roots_template_path();
?>
示例10: roots_template_path
if (is_page_template('template-fullwidth.php')) {
?>
fullwidth<?php
}
if (is_page() && has_post_thumbnail() && $show_header) {
?>
has-page-header<?php
}
?>
" role="main">
<?php
include roots_template_path();
?>
</main><!-- /.main -->
<?php
if (roots_display_sidebar() && !is_page_template('template-fullwidth.php')) {
?>
<aside class="sidebar" role="complementary">
<hr class="visible-xs" />
<?php
include roots_sidebar_path();
?>
</aside><!-- /.sidebar -->
<?php
}
?>
</div><!-- /.content -->
</div><!-- /.wrap -->
<?php
示例11: do_action
<?php
do_action('get_header');
get_template_part('templates/header');
?>
<div class="content" role="document">
<main class="main" role="main">
<?php include roots_template_path(); ?>
</main><!-- /.main -->
<?php if (roots_display_sidebar()) : ?>
<aside class="sidebar <?php echo roots_sidebar_class(); ?> columns" role="complementary">
<?php include roots_sidebar_path(); ?>
</aside><!-- /.sidebar -->
<?php endif; ?>
</div><!-- /.content -->
<?php get_template_part('templates/footer'); ?>
</body>
</html>