本文整理汇总了PHP中presscore_is_content_visible函数的典型用法代码示例。如果您正苦于以下问题:PHP presscore_is_content_visible函数的具体用法?PHP presscore_is_content_visible怎么用?PHP presscore_is_content_visible使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了presscore_is_content_visible函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: presscore_single_post_navigation_bar
function presscore_single_post_navigation_bar()
{
if (!(is_single() && presscore_is_content_visible())) {
return;
}
switch (get_post_type()) {
case 'post':
$post_meta = presscore_new_posted_on('single_post');
break;
case 'dt_portfolio':
$post_meta = presscore_new_posted_on('single_dt_portfolio');
break;
case 'dt_gallery':
$post_meta = presscore_new_posted_on('single_dt_gallery');
break;
default:
$post_meta = '';
}
$post_navigation = presscore_post_navigation();
if ($post_meta || $post_navigation) {
$article_top_bar_html_class = 'article-top-bar ' . presscore_get_page_title_bg_mode_html_class();
if (!$post_meta) {
$article_top_bar_html_class .= ' post-meta-disabled';
}
echo '<div class="' . $article_top_bar_html_class . '"><div class="wf-wrap"><div class="wf-container-top">';
echo presscore_get_post_meta_wrap($post_meta);
echo '<div class="navigation-inner"><div class="single-navigation-wrap">' . $post_navigation . '</div></div>';
echo '</div></div></div>';
}
}
示例2: presscore_single_post_navigation_bar
function presscore_single_post_navigation_bar()
{
if (!(is_single() && presscore_is_content_visible())) {
return;
}
$post_meta = presscore_get_posted_on();
$post_navigation = presscore_post_navigation();
if ($post_meta || $post_navigation) {
$article_top_bar_html_class = 'article-top-bar ' . presscore_get_page_title_bg_mode_html_class();
if (!$post_meta) {
$article_top_bar_html_class .= ' post-meta-disabled';
}
echo '<div class="' . esc_attr($article_top_bar_html_class) . '"><div class="wf-wrap"><div class="wf-container-top">';
echo $post_meta;
echo '<div class="navigation-inner"><div class="single-navigation-wrap">' . $post_navigation . '</div></div>';
echo '</div></div></div>';
}
}
示例3: add_action
* Blog masonry template
*
* @package vogue
* @since 1.0.0
*/
// File Security Check
if (!defined('ABSPATH')) {
exit;
}
$config = Presscore_Config::get_instance();
$config->set('template', 'blog');
$config->set('template.layout.type', 'masonry');
// add content controller
add_action('presscore_before_main_container', 'presscore_page_content_controller', 15);
get_header();
if (presscore_is_content_visible()) {
?>
<!-- Content -->
<div id="content" class="content" role="main">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
// main loop
do_action('presscore_before_loop');
if (post_password_required()) {
the_content();
} else {
// backup config
示例4: do_action
do_action('presscore_body_top');
?>
<?php
$config = presscore_get_config();
?>
<div id="page"<?php
if ('boxed' == $config->get('template.layout')) {
echo ' class="boxed"';
}
?>
>
<?php
if (presscore_is_content_visible() && $config->get('template.footer.background.slideout_mode')) {
echo '<div class="page-inner">';
}
?>
<?php
if (apply_filters('presscore_show_header', true)) {
?>
<!-- left, center, classic, side -->
<?php
dt_get_template_part('header/header', of_get_option('header-layout', 'left'));
?>
<?php
}
示例5: presscore_page_title_controller
function presscore_page_title_controller()
{
$config = Presscore_Config::get_instance();
if (!($config->get('page_title.enabled') || $config->get('page_title.breadcrumbs.enabled'))) {
return;
}
$show_page_title = presscore_is_post_title_enabled() && presscore_is_content_visible();
if (!$show_page_title) {
return;
}
$page_title_wrap_attrs = '';
$parallax_speed = $config->get('page_title.background.parallax_speed');
if ($parallax_speed) {
$page_title_wrap_attrs .= ' data-prlx-speed="' . $parallax_speed . '"';
}
$title_height = absint($config->get('page_title.height'));
$page_title_wrap_attrs .= ' style="min-height: ' . $title_height . 'px;"';
$page_title_wrap_table_style = ' style="height: ' . $title_height . 'px;"';
?>
<div <?php
echo presscore_get_page_title_wrap_html_class('page-title'), $page_title_wrap_attrs;
?>
>
<div class="wf-wrap">
<div class="wf-container-title">
<div class="wf-table"<?php
echo $page_title_wrap_table_style;
?>
>
<?php
// get page title
if ($config->get('page_title.enabled')) {
$page_title = '<div class="wf-td hgroup"><h1 ' . presscore_get_page_title_html_class() . '>' . presscore_get_page_title() . '</h1></div>';
} else {
$page_title = '';
}
$page_title = apply_filters('presscore_page_title', $page_title);
// get breadcrumbs
if ($config->get('page_title.breadcrumbs.enabled')) {
$breadcrumbs = presscore_get_page_title_breadcrumbs();
} else {
$breadcrumbs = '';
}
// output
if ('right' == $config->get('page_title.align')) {
echo $breadcrumbs, $page_title;
} else {
echo $page_title, $breadcrumbs;
}
?>
</div>
</div>
</div>
</div>
<?php
}
示例6: presscore_page_title_controller
/**
* Page title controller.
*/
function presscore_page_title_controller()
{
global $post;
$show_titles = of_get_option('general-show_titles', '1');
if (!$show_titles) {
return;
}
$title_align = of_get_option('general-title_align', 'center');
$title_classes = array('page-title');
switch ($title_align) {
case 'right':
$title_classes[] = 'title-right';
break;
case 'left':
$title_classes[] = 'title-left';
break;
default:
$title_classes[] = 'title-center';
}
$before_title = '<div class="' . esc_attr(implode(' ', $title_classes)) . '"><div class="wf-wrap"><div class="wf-table">';
$after_title = '</div></div></div>';
$title_template = '<div class="wf-td"><h1>%s</h1></div>';
$title = '';
$breadcrumbs = apply_filters('dt_sanitize_flag', of_get_option('general-show_breadcrumbs', 1));
$is_single = is_single();
if (is_page() || $is_single) {
$config = Presscore_Config::get_instance();
$title_mode = $config->get('header_title');
if ('disabled' != $title_mode && presscore_is_content_visible()) {
if ($is_single) {
$title_template = '<div class="wf-td"><h1 class="entry-title">%s</h1></div>';
}
$title = sprintf($title_template, get_the_title());
} else {
$breadcrumbs = false;
$before_title = $after_title = '';
return;
}
} else {
if (is_search()) {
$message = sprintf(_x('Search Results for: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . get_search_query() . '</span>');
$title = sprintf($title_template, $message);
} else {
if (is_archive()) {
if (is_category()) {
$message = sprintf(_x('%s', 'archive template title', LANGUAGE_ZONE), '<span>' . single_cat_title('', false) . '</span>');
} elseif (is_tag()) {
$message = sprintf(_x('Tag Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . single_tag_title('', false) . '</span>');
} elseif (is_author()) {
the_post();
$message = sprintf(_x('Author Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span class="vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta("ID"))) . '" title="' . esc_attr(get_the_author()) . '" rel="me">' . get_the_author() . '</a></span>');
rewind_posts();
} elseif (is_day()) {
$message = sprintf(_x('Daily Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . get_the_date() . '</span>');
} elseif (is_month()) {
$message = sprintf(_x('Monthly Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . get_the_date('F Y') . '</span>');
} elseif (is_year()) {
$message = sprintf(_x('Yearly Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . get_the_date('Y') . '</span>');
} elseif (is_tax('dt_portfolio_category')) {
$message = sprintf(_x('Portfolio Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . single_term_title('', false) . '</span>');
} elseif (is_tax('dt_gallery_category')) {
$message = sprintf(_x('Albums Archives: %s', 'archive template title', LANGUAGE_ZONE), '<span>' . single_term_title('', false) . '</span>');
} else {
$message = _x('Archives:', 'archive template title', LANGUAGE_ZONE);
}
$title = sprintf($title_template, $message);
} elseif (is_404()) {
$title = sprintf($title_template, _x('Page not found', 'index title', LANGUAGE_ZONE));
} else {
$title = sprintf($title_template, _x('Blog', 'index title', LANGUAGE_ZONE));
}
}
}
echo $before_title;
if ('right' == $title_align) {
echo $breadcrumbs ? presscore_get_breadcrumbs() : '';
echo apply_filters('presscore_page_title', $title, $title_template);
} else {
echo apply_filters('presscore_page_title', $title, $title_template);
echo $breadcrumbs ? presscore_get_breadcrumbs() : '';
}
echo $after_title;
}