本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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'])) {
示例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;
}
示例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;
}
示例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;
}