當前位置: 首頁>>代碼示例>>PHP>>正文


PHP kopa_get_template_setting函數代碼示例

本文整理匯總了PHP中kopa_get_template_setting函數的典型用法代碼示例。如果您正苦於以下問題:PHP kopa_get_template_setting函數的具體用法?PHP kopa_get_template_setting怎麽用?PHP kopa_get_template_setting使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了kopa_get_template_setting函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: kopa_body_class

function kopa_body_class($classes)
{
    $template_setting = kopa_get_template_setting();
    if (is_front_page()) {
        $classes[] = 'home-page';
    } else {
        $classes[] = 'sub-page';
    }
    if (get_option('kopa_theme_options_layout', 'box') == 'wide') {
        $classes[] = 'kopa-style-full';
    } else {
        $classes[] = 'kopa-style-box';
    }
    if (is_404()) {
        return $classes;
    }
    switch ($template_setting['layout_id']) {
        case 'home-page-1':
            $classes[] = 'kopa-home-1';
            break;
        case 'single-right-sidebar':
            $post_thumbnail_style = get_option('kopa_theme_options_post_thumbnail_style', 'small');
            if ($post_thumbnail_style == 'large') {
                $classes[] = 'kopa-single-2';
            }
            $queried_object = get_queried_object();
            if ('video' == get_post_format($queried_object->ID)) {
                $classes[] = 'background-red';
            }
            break;
    }
    return $classes;
}
開發者ID:jimdough,項目名稱:Roadmaster,代碼行數:33,代碼來源:front.php

示例2: kopa_body_class

function kopa_body_class($classes)
{
    $template_setting = kopa_get_template_setting();
    if (is_front_page()) {
        $classes[] = 'home-page';
    } else {
        $classes[] = 'sub-page';
    }
    switch ($template_setting['layout_id']) {
        case 'blog':
            $classes[] = 'kp-categories-1';
            break;
        case 'blog-2':
            $classes[] = 'kp-categories-2';
            break;
        case 'blog-3':
            $classes[] = 'kp-categories-3';
            break;
        case 'blog-4':
            $classes[] = 'kp-categories-4';
            break;
        case 'blog-5':
            $classes[] = 'kp-categories-5';
            break;
        case 'single-right-sidebar':
            $queried_object = get_queried_object();
            if ('' == get_post_format($queried_object->ID)) {
                $classes[] = 'kp-single-standard';
            } elseif ('gallery' == get_post_format($queried_object->ID)) {
                $classes[] = 'kp-single-gallery';
            } elseif ('video' == get_post_format($queried_object->ID)) {
                $classes[] = 'background-red';
            }
            $classes[] = 'kp-single-right-sidebar';
            break;
        case 'page-right-sidebar':
            $classes[] = 'kp-page-right-sidebar';
            break;
        case 'page-fullwidth':
            $classes[] = 'kp-elements-page';
            break;
        case 'page-fullwidth-widgets':
            $classes[] = 'kp-gallery-page';
            break;
        case 'error-404':
            $classes[] = 'kp-error-page';
            break;
    }
    return $classes;
}
開發者ID:abhinay100,項目名稱:wordpress_dash,代碼行數:50,代碼來源:front.php

示例3: kopa_body_class

function kopa_body_class($classes)
{
    $template_setting = kopa_get_template_setting();
    $classes[] = get_option('kopa_theme_options_footer_style', 'dark-footer');
    if (is_front_page()) {
        $classes[] = 'home-page';
    } else {
        $classes[] = 'sub-page';
    }
    switch ($template_setting['layout_id']) {
        case 'home-page-1':
            $classes[] = 'kopa-home-2';
            break;
        case 'home-page-2':
            $classes[] = 'kopa-home-3';
            break;
        case 'home-page-3':
            $classes[] = 'kopa-home-4';
            break;
        case 'blog-right-sidebar':
            $classes[] = 'kopa-blog-1';
            break;
        case 'blog-2-right-sidebar':
            $classes[] = 'kopa-blog-2';
            break;
        case 'single-right-sidebar':
            $classes[] = 'kopa-single-standard-1';
            break;
        case 'single-2-right-sidebar':
            $classes[] = 'kopa-single-standard-2';
            break;
        case 'portfolio':
            $classes[] = 'kopa-portfolio-page';
            break;
        case 'page-fullwidth-widgets':
            $classes[] = 'kopa-about-page';
            break;
    }
    return $classes;
}
開發者ID:JeremyChristian,項目名稱:webasr2,代碼行數:40,代碼來源:front.php

示例4: kopa_get_template_setting

<?php

$kopa_setting = kopa_get_template_setting();
$sidebars = $kopa_setting['sidebars'];
?>

<?php 
get_header();
?>

<div class="wrapper">

    <div class="main-col">

        <?php 
kopa_breadcrumb();
?>

        <div class="widget-area-1">

            <?php 
get_template_part('library/templates/parts/loop-blog-1');
?>

        </div>
        <!-- widget-area-1 -->

    </div>
    <!-- main-col -->
    <?php 
if (is_active_sidebar($sidebars['position_16'])) {
開發者ID:jimdough,項目名稱:Roadmaster,代碼行數:31,代碼來源:blog-2.php

示例5: kopa_body_class

function kopa_body_class($class)
{
    $kopa_setting = kopa_get_template_setting();
    if ($kopa_setting['layout_id'] == 'blog-left-sidebar') {
        $class[] = 'kp-right-sidebar';
    } elseif ($kopa_setting['layout_id'] == 'blog-right-sidebar') {
        $class[] = '';
    } elseif ($kopa_setting['layout_id'] == 'blog-no-sidebar' || $kopa_setting['layout_id'] == '404-page') {
        $class[] = 'kp-no-sidebar';
    }
    if (is_singular()) {
        if (get_post_format() == '') {
            $class[] = 'kp-single-standard';
        } elseif (get_post_format()) {
            $class[] = 'kp-single-' . get_post_format();
        }
    }
    return $class;
}
開發者ID:VitaAprel,項目名稱:mynotebook,代碼行數:19,代碼來源:front.php

示例6: fastnews_get_template_setting

function fastnews_get_template_setting($default = null)
{
    if (function_exists('kopa_get_template_setting')) {
        return kopa_get_template_setting();
    }
    return $default;
}
開發者ID:jimdough,項目名稱:Roadmaster,代碼行數:7,代碼來源:front.php

示例7: kopa_custom_excerpt_length

function kopa_custom_excerpt_length($length)
{
    $kopa_setting = kopa_get_template_setting();
    if ('home' == $kopa_setting['layout_id']) {
        return 25;
    }
    return $length;
}
開發者ID:sekane81,項目名稱:ratoninquietoweb,代碼行數:8,代碼來源:front.php


注:本文中的kopa_get_template_setting函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。