当前位置: 首页>>代码示例>>PHP>>正文


PHP Setup\display_sidebar函数代码示例

本文整理汇总了PHP中Roots\Sage\Setup\display_sidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP display_sidebar函数的具体用法?PHP display_sidebar怎么用?PHP display_sidebar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了display_sidebar函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: TimberMenu

 function add_to_context($context)
 {
     /* Add extra data */
     $context['foo'] = 'I am some other typical value set in your functions.php file, unrelated to the menu';
     /* Menu */
     $context['menu'] = new TimberMenu('primary_navigation');
     /* Site info */
     $context['site'] = $this;
     /* Site info */
     $context['display_sidebar'] = Setup\display_sidebar();
     $context['sidebar_primary'] = Timber::get_widgets('sidebar-primary');
     return $context;
 }
开发者ID:rob-ot-dot-be,项目名称:sage-twig-theme,代码行数:13,代码来源:timber.php

示例2: body_class

/**
 * Add <body> classes
 */
function body_class($classes)
{
    // Add page slug if it doesn't exist
    if (is_single() || is_page() && !is_front_page()) {
        if (!in_array(basename(get_permalink()), $classes)) {
            $classes[] = basename(get_permalink());
        }
    }
    // Add class if sidebar is active
    if (Setup\display_sidebar()) {
        $classes[] = 'sidebar-primary';
    }
    return $classes;
}
开发者ID:kevinriemens,项目名称:cda-kerkrade,代码行数:17,代码来源:extras.php

示例3: body_class

/**
 * Add <body> classes
 */
function body_class($classes)
{
    // Add page slug if it doesn't exist
    if (is_single() || is_page() && !is_front_page()) {
        if (!in_array(basename(get_permalink()), $classes)) {
            $classes[] = basename(get_permalink());
        }
    }
    if (!is_home() && 'area-skin-care' != get_post_type() && __('osmin-linea-pediatrica', 'sage') !== basename(get_permalink()) || is_search()) {
        $classes[] = 'no-full-slider';
    }
    // Add class if sidebar is active
    if (Setup\display_sidebar()) {
        $classes[] = 'sidebar-primary';
    }
    return $classes;
}
开发者ID:Kilbourne,项目名称:biogena-bedrock,代码行数:20,代码来源:extras.php

示例4: body_class

/**
 * Add <body> classes
 */
function body_class($classes)
{
    // Add page slug if it doesn't exist
    if (is_single() || is_page() && !is_front_page()) {
        if (!in_array(basename(get_permalink()), $classes)) {
            $classes[] = basename(get_permalink());
        }
    }
    // Add post has featured image class
    if (is_singular() && has_post_thumbnail($post->ID)) {
        $classes[] = 'feature-image';
    }
    // Add class if sidebar is active
    if (Setup\display_sidebar()) {
        $classes[] = 'sidebar-primary';
    }
    return $classes;
}
开发者ID:arikan,项目名称:ba,代码行数:21,代码来源:extras.php

示例5: body_class

/**
 * Add <body> classes
 */
function body_class($classes)
{
    // Add page slug if it doesn't exist
    if (is_single() || is_page() && !is_front_page()) {
        if (!in_array(basename(get_permalink()), $classes)) {
            $classes[] = basename(get_permalink());
        }
    }
    // Add class if sidebar is active
    if (Setup\display_sidebar()) {
        $classes[] = 'sidebar-primary';
    }
    // Add a class if using a navbar-fixed-top
    if (current_theme_supports('navbarfixed-top')) {
        $classes[] = 'navbar-fixed-top-body';
    }
    return $classes;
}
开发者ID:bristweb,项目名称:wp-site-submodule,代码行数:21,代码来源:extras.php

示例6: body_class

/**
 * Add <body> classes
 */
function body_class($classes)
{
    // Add page slug if it doesn't exist
    if (is_single() || is_page() && !is_front_page()) {
        if (!in_array(basename(get_permalink()), $classes)) {
            $classes[] = basename(get_permalink());
        }
    }
    // Add class if sidebar is active
    if (Setup\display_sidebar()) {
        $classes[] = 'sidebar-primary';
    }
    // Add class if post has thumbnails
    if (current_theme_supports('post-thumbnails')) {
        if (!has_post_thumbnail()) {
            $classes[] = 'no-thumbnail';
        }
    }
    return $classes;
}
开发者ID:fcojgodoy,项目名称:teruterubozu,代码行数:23,代码来源:extras.php

示例7:

} else {
    ?>
            <!-- for other article -->

            <div class="col-md-8"> <!-- main post -->

               <main>
                <?php 
    include Wrapper\template_path();
    ?>
              </main><!-- /.main -->
            </div>

            <div class="col-md-4"> <!-- side bar -->
              <?php 
    if (Setup\display_sidebar()) {
        ?>
                <aside>
                  <?php 
        include Wrapper\sidebar_path();
        ?>
                </aside>
              <?php 
    }
    ?>
            </div>

          <?php 
}
?>
开发者ID:Wisnuunu,项目名称:cerebro-sage,代码行数:30,代码来源:base.php


注:本文中的Roots\Sage\Setup\display_sidebar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。