示例#1
0
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;
}
示例#2
0
 function __construct($conditionals = array(), $templates = array())
 {
     $this->conditionals = $conditionals;
     $this->templates = $templates;
     $conditionals = array_map(array($this, 'check_conditional_tag'), $this->conditionals);
     $templates = array_map(array($this, 'check_page_template'), $this->templates);
     if (in_array(true, $conditionals) || in_array(true, $templates)) {
         $this->display = false;
     }
     $this->display = ciGetNormalizedMeta('show_page_sidebar', $this->display);
 }
示例#3
0
function ciGetContainerClass()
{
    $containerClass = "container";
    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;
}
示例#4
0
/**
 * @param $category string Name of the category to filter. If empty, we'll return slides from all categories.
 * @param $maxNumSlides int Maximum number of slides to return
 * @param $size string One of two constants: SIZE_LG or SIZE_MD (use MD if the image will be in a container div)
 * @return array All the slide data you need. Keys are 'content', 'title', 'imgURL', 'imgWidth', and 'imgHeight'
 */
function ciGetAllSlides($category, $maxNumSlides, $size)
{
    if ($size == CI_SIZE_INPAGE) {
        $size = CI_SIZE_MD;
    }
    $query = null;
    if ($category) {
        $query = new WP_Query(array('category_name' => $category, 'post_type' => CI_SLIDE_TYPE, 'showposts' => $maxNumSlides));
    } else {
        $query = new WP_Query('showposts=' . $maxNumSlides . '&post_type=' . CI_SLIDE_TYPE);
    }
    $slidesArray = array();
    while ($query->have_posts()) {
        $query->next_post();
        $attachment = wp_get_attachment_image_src(get_post_thumbnail_id($query->post->ID), $size);
        if ($attachment) {
            $slidesArray[] = array('id' => $query->post->ID, 'content' => apply_filters('the_content', $query->post->post_content), 'title' => apply_filters('the_title', $query->post->post_title), 'imgURL' => $attachment[0], 'imgWidth' => $attachment[1], 'imgHeight' => $attachment[2], 'contentPosition' => ciGetNormalizedMeta('caption_position', 'center', $query->post->ID), 'bg' => ciGetNormalizedMeta('caption_bg', '', $query->post->ID), 'link' => ciGetNormalizedMeta('link', '', $query->post->ID), 'darken' => ciGetNormalizedMeta('darken_slide', true, $query->post->ID));
        }
    }
    wp_reset_postdata();
    return $slidesArray;
}
<!-- PAGE-HEADER-ARCHIVE.PHP -->
<?php 
$showTitle = ciGetNormalizedMeta('show_page_title', true);
if ($showTitle) {
    ?>
    <div class="page-header">
        <?php 
    if (is_post_type_archive(CI_STAFF_TYPE)) {
        ?>
            <h1>Our <?php 
        echo roots_title();
        ?>
</h1>
        <?php 
    } else {
        ?>
            <h1><?php 
        echo roots_title();
        ?>
</h1>
        <?php 
    }
    ?>
    </div> <?php 
} else {
    ?>
    <div class="buffer"></div> <?php 
}
示例#6
0
文件: base.php 项目: s3cur3/ci-mdo
// Use Bootstrap's navbar if enabled in config.php
if (current_theme_supports('bootstrap-top-navbar')) {
    get_template_part('templates-custom/header-top-navbar-logo-below');
} else {
    get_template_part('templates/header');
}
if ($showSlider) {
    if (function_exists('ciGetSliderHTML')) {
        $sliderCat = ciGetNormalizedMeta('top_img_slider_cat_string', '');
        echo ciGetSliderHTML($sliderCat, 10, true, CI_SIZE_LG);
    } else {
        echo "<pre>You requested a slider be displayed here, but it looks like the slider plugin (\"Slides Custom Post Type\") is either not installed or not active!</pre>";
    }
}
$pushPageDownAmt = intval(ciGetNormalizedMeta('push_page_down', 0));
$pushFooterDownAmt = intval(ciGetNormalizedMeta('push_footer_down', 0));
if ($pushPageDownAmt + $pushFooterDownAmt > 0) {
    ?>
    <style>
        .wrap.container {
            margin-top: <?php 
    echo $pushPageDownAmt;
    ?>
px;
            margin-bottom: <?php 
    echo $pushFooterDownAmt;
    ?>
px;
        }
        .has-top-slider .wrap.container {
            margin-top: inherit;
示例#7
0
<?php

$showSlider = ciGetNormalizedMeta('top_img_slider', false);
$additionalClass = "landing-page";
if ($showSlider) {
    $additionalClass .= " has-top-slider";
}
$additionalBodyClass .= get_option('style', CI_STYLE_CLEAN);
get_template_part('templates/head');
?>
<body <?php 
body_class($additionalClass);
?>
>

    <!--[if lt IE 8]>
    <div class="alert alert-warning">
        <?php 
_e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your
        browser</a> to improve your experience.', 'ci-modern-accounting-firm');
?>
    </div>
    <![endif]-->

    <?php 
do_action('get_header');
// Use Bootstrap's navbar if enabled in config.php
if (current_theme_supports('bootstrap-top-navbar')) {
    get_template_part('templates/header-top-navbar-landing');
} else {
    get_template_part('templates/header');
示例#8
0
<?php

global $ciSidebars;
reset($ciSidebars);
$default = key($ciSidebars);
$sidebar = ciGetNormalizedMeta('sidebar', $default);
dynamic_sidebar($sidebar);
示例#9
0
文件: social.php 项目: s3cur3/ci-mdo
/**
 * @param int $postID The ID of the staff member "post" whose links we should look up
 * @return string[] The override profile links to use with ciPrintSocialLinks()
 */
function ciGetStaffSocialURLs($postID = null)
{
    $arr = array('facebook' => ciGetNormalizedMeta('facebook', '', $postID), 'twitter' => ciGetNormalizedMeta('twitter', '', $postID), 'google-plus' => ciGetNormalizedMeta('google-plus', '', $postID), 'linkedin' => ciGetNormalizedMeta('linkedin', '', $postID));
    return $arr;
}