Esempio n. 1
0
/**
 * Prepare the title/breadcrumb area using hide/show site options
 * @param integer $post_id
 * @return array
 */
function kleo_prepare_title($post_id = null)
{
    $title_arr = array();
    $title_arr['title'] = kleo_title();
    //hide title?
    $title_arr['show_title'] = true;
    if (get_cfield('title_checkbox', $post_id) == 1) {
        $title_arr['show_title'] = false;
    }
    if (sq_option('title_location', 'breadcrumb') == 'main') {
        $title_arr['show_title'] = false;
    }
    //hide breadcrumb?
    $title_arr['show_breadcrumb'] = true;
    if (sq_option('breadcrumb_status', 1) == 0) {
        $title_arr['show_breadcrumb'] = false;
    }
    if (get_cfield('hide_breadcrumb', $post_id) == 1) {
        $title_arr['show_breadcrumb'] = false;
    } else {
        if (get_cfield('hide_breadcrumb', $post_id) === '0') {
            $title_arr['show_breadcrumb'] = true;
        }
    }
    //hide extra info?
    if (get_cfield('hide_info', $post_id) == 1) {
        $title_arr['extra'] = '';
    }
    return $title_arr;
}
Esempio n. 2
0
<?php

/**
 * @package WordPress
 * @subpackage Kleo
 * @author SeventhQueen <*****@*****.**>
 * @since Kleo 1.0
 */
$title_arr = array();
$title_arr['title'] = kleo_title();
//hide title?
$title_arr['show_title'] = true;
if (get_cfield('title_checkbox') == 1) {
    $title_arr['show_title'] = false;
}
//If we are displaying the title in the main area, not the breadcrumb area
if (sq_option('title_location', 'breadcrumb') == 'main') {
    $title_arr['show_title'] = false;
}
//hide breadcrumb?
$title_arr['show_breadcrumb'] = true;
if (sq_option('breadcrumb_status', 1) == 0) {
    $title_arr['show_breadcrumb'] = false;
}
if (get_cfield('hide_breadcrumb') == 1) {
    $title_arr['show_breadcrumb'] = false;
} else {
    if (get_cfield('hide_breadcrumb') === '0') {
        $title_arr['show_breadcrumb'] = true;
    }
}
Esempio n. 3
0
 /**
  * Echo the title if it was set to show in main content area
  */
 function kleo_title_main_content()
 {
     if (sq_option('title_location', 'breadcrumb') == 'main') {
         $title_status = true;
         if (is_singular() && get_cfield('title_checkbox') == 1) {
             $title_status = false;
         }
         if ($title_status) {
             if (is_singular() && get_cfield('custom_title') && get_cfield('custom_title') != '') {
                 $title = get_cfield('custom_title');
             } else {
                 $title = kleo_title();
             }
             echo '<div class="container">';
             echo '<h1 class="page-title">' . $title . '</h1>';
             echo '</div>';
         }
     }
 }
Esempio n. 4
0
$template_classes = $blog_type . '-listing';
if (sq_option('blog_archive_meta', 1) == 1) {
    $template_classes .= ' with-meta';
} else {
    $template_classes .= ' no-meta';
}
if ($blog_type == 'standard' && sq_option('blog_standard_meta', 'left') == 'inline') {
    $template_classes .= ' inline-meta';
}
add_filter('kleo_main_template_classes', create_function('$cls', '$cls .=" posts-listing ' . $template_classes . '"; return $cls;'));
/***************************************************
:: Title section
***************************************************/
//title
$title_arr['show_title'] = true;
$page_title = kleo_title();
if (sq_option('title_location', 'breadcrumb') == 'main') {
    $title_arr['show_title'] = false;
}
//breadcrumb
$title_arr['show_breadcrumb'] = true;
if (sq_option('breadcrumb_status', 1) == 0) {
    $title_arr['show_breadcrumb'] = false;
}
//extra info
if (sq_option('title_info', '') == '') {
    $show_info = FALSE;
} else {
    $show_info = TRUE;
}
//If we have designated a page for latest posts like Blog page