Ejemplo n.º 1
0
$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;
    }
}
//extra info
if (get_cfield('hide_info') == 1 || sq_option('title_info', '') == '') {
    $show_info = FALSE;
} else {
    $show_info = TRUE;
}
if (isset($title_arr['show_breadcrumb']) && $title_arr['show_breadcrumb'] || $show_info === TRUE || $title_arr['show_title']) {
    echo kleo_title_section($title_arr);
}
Ejemplo n.º 2
0
?>

<?php 
//Specific class for post listing */
if (kleo_postmeta_enabled()) {
    $meta_status = ' with-meta';
    add_filter('kleo_main_template_classes', create_function('$cls', '$cls .= "' . $meta_status . '"; return $cls;'));
}
/* Related posts logic */
$related = sq_option('related_posts', 1);
if (!is_singular('post')) {
    $related = sq_option('related_custom_posts', 0);
}
//post setting
if (get_cfield('related_posts') != '') {
    $related = get_cfield('related_posts');
}
?>

<?php 
get_template_part('page-parts/general-title-section');
?>

<?php 
get_template_part('page-parts/general-before-wrap');
?>

<?php 
/* Start the Loop */
while (have_posts()) {
    the_post();
Ejemplo n.º 3
0
Archivo: index.php Proyecto: 6226/wp
    $show_info = TRUE;
}
//If we have designated a page for latest posts like Blog page
if (get_option('page_for_posts')) {
    $blogpage_id = get_option('page_for_posts');
    $page_title = get_the_title($blogpage_id);
    if (get_cfield('title_checkbox', $blogpage_id) == 1) {
        $title_arr['show_title'] = false;
    }
    if (get_cfield('hide_info', $blogpage_id) == 1) {
        $show_info = FALSE;
    }
    if (get_cfield('hide_breadcrumb', $blogpage_id) == 1) {
        $title_arr['show_breadcrumb'] = false;
    } else {
        if (get_cfield('hide_breadcrumb', $blogpage_id) === '0') {
            $title_arr['show_breadcrumb'] = true;
        }
    }
}
$title_arr['title'] = $page_title;
if (isset($title_arr['show_breadcrumb']) && $title_arr['show_breadcrumb'] || $show_info === TRUE || $title_arr['show_title']) {
    echo kleo_title_section($title_arr);
}
/* END TITLE SECTION */
?>

<?php 
get_template_part('page-parts/general-before-wrap');
?>
Ejemplo n.º 4
0
 // video bg self hosted
 $bg_video_args = array();
 $k_video = '';
 if (get_cfield('video_mp4')) {
     $bg_video_args['mp4'] = get_cfield('video_mp4');
 }
 if (get_cfield('video_ogv')) {
     $bg_video_args['ogv'] = get_cfield('video_ogv');
 }
 if (get_cfield('video_webm')) {
     $bg_video_args['wemb'] = get_cfield('video_webm');
 }
 if (!empty($bg_video_args)) {
     $attr_strings = array('preload="none"');
     if (get_cfield('video_poster')) {
         $attr_strings[] = 'poster="' . get_cfield('video_poster') . '"';
     }
     $k_video .= '<div class="kleo-video-wrap"><video ' . join(' ', $attr_strings) . ' controls="controls" class="kleo-video" style="height: 100%; width: 100%;">';
     $source = '<source type="%s" src="%s" />';
     foreach ($bg_video_args as $video_type => $video_src) {
         $video_type = wp_check_filetype($video_src, wp_get_mime_types());
         $k_video .= sprintf($source, $video_type['type'], esc_url($video_src));
     }
     $k_video .= '</video></div>';
     echo '<div class="article-media clearfix">';
     echo $k_video;
     echo '</div>';
 } elseif (!empty($video)) {
     echo '<div class="article-media clearfix">';
     echo wp_oembed_get($video);
     echo '</div>';
Ejemplo n.º 5
0
<?php

/**
 * The template for displaying posts in the Link post format
 *
 * @package WordPress
 * @subpackage Kleo
 * @since Kleo 1.0
 */
?>

<?php 
$post_class = 'clearfix';
if (is_single() && get_cfield('centered_text') == 1) {
    $post_class .= ' text-center';
}
?>

<!-- Begin Article -->
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class(array($post_class));
?>
>

	<?php 
if (kleo_postmeta_enabled()) {
    ?>
		<div class="article-meta">
Ejemplo n.º 6
0
}
query_posts($args);
if (have_posts()) {
    ob_start();
    ?>
	<div class="<?php 
    echo $class;
    ?>
">
		
		<?php 
    while (have_posts()) {
        the_post();
        $client_link = '#';
        if (get_cfield('client_link')) {
            $client_link = get_cfield('client_link');
        }
        if (get_post_thumbnail_id()) {
            ?>
			<div class="client <?php 
            if ($animated != '') {
                echo 'list-el-animated';
            }
            ?>
">
				<a href="<?php 
            echo $client_link;
            ?>
" <?php 
            if ($animated != '') {
                echo 'class="el-' . $animation . '"';
Ejemplo n.º 7
0
function kleo_woo_set_custom_menu($args = '')
{
    $shop_id = wc_get_page_id('shop');
    if (is_shop()) {
        $menuslug = get_cfield('page_menu', $shop_id);
        if (!empty($menuslug) && $menuslug != 'default' && is_nav_menu($menuslug)) {
            $args['menu'] = $menuslug;
        }
    }
    return $args;
}
Ejemplo n.º 8
0
		<div class="article-media">
		 <?php 
    //oEmbed video
    $video = get_cfield('embed');
    // video bg self hosted
    $bg_video_args = array();
    $k_video = '';
    if (get_cfield('video_mp4')) {
        $bg_video_args['mp4'] = get_cfield('video_mp4');
    }
    if (get_cfield('video_ogv')) {
        $bg_video_args['ogv'] = get_cfield('video_ogv');
    }
    if (get_cfield('video_webm')) {
        $bg_video_args['webm'] = get_cfield('video_webm');
    }
    if (!empty($bg_video_args)) {
        $attr_strings = array('preload="0"');
        $k_video .= sprintf('<div class="kleo-video-wrap"><video %s controls="controls" class="kleo-video">', join(' ', $attr_strings));
        $source = '<source type="%s" src="%s" />';
        foreach ($bg_video_args as $video_type => $video_src) {
            $video_type = wp_check_filetype($video_src, wp_get_mime_types());
            $k_video .= sprintf($source, $video_type['type'], esc_url($video_src));
        }
        $k_video .= '</video></div>';
        echo $k_video;
    } elseif (!empty($video)) {
        global $wp_embed;
        echo apply_filters('kleo_oembed_video', $video);
    }
Ejemplo n.º 9
0
<?php

/** 
 * Displays social share icons
 * @package WordPress
 * @subpackage Kleo
 * @since Kleo 1.0
 */
$social_share = sq_option('blog_social_share', 1);
if (get_cfield('blog_social_share') != '') {
    $social_share = get_cfield('blog_social_share');
}
$like_status = sq_option('likes_status', 1);
if ($social_share != 1 && $like_status != 1) {
    return;
}
?>
<section class="container-wrap">
	<div class="container">
		<div class="share-links">
      
      <div class="hr-title hr-long"><abbr><?php 
_e("Share this article:", "kleo_framework");
?>
</abbr></div>
      
			<?php 
if ($like_status == 1) {
    ?>
			
      <span class="kleo-love">
Ejemplo n.º 10
0
			<span class="post-meta">
				<?php 
    kleo_entry_meta();
    ?>
			</span>
			<?php 
    edit_post_link(esc_html__('Edit', 'kleo_framework'), '<span class="edit-link">', '</span>');
    ?>
		</div><!--end article-meta-->
	<?php 
}
?>


	<?php 
$audio = get_cfield('audio');
if (kleo_postmedia_enabled() && !empty($audio)) {
    ?>

		<div class="article-media post-audio">          
			<audio id="audio_<?php 
    the_id();
    ?>
" class="kleo-audio" style="width:100%;" src="<?php 
    echo $audio;
    ?>
"></audio>
		</div><!--end article-media-->

	<?php 
}
Ejemplo n.º 11
0
 function the_cfield($meta = NULL, $id = NULL)
 {
     echo get_cfield($meta, $id);
 }
Ejemplo n.º 12
0
Archivo: config.php Proyecto: 6226/wp
function kleo_woo_bottom_content()
{
    $shop_id = woocommerce_get_page_id('shop');
    if (!$shop_id) {
        return;
    }
    $page_bottom = get_cfield('bottom_content', $shop_id);
    if (is_shop() && $page_bottom != '') {
        echo '<div class="kleo-page-bottom">';
        echo do_shortcode($page_bottom);
        echo '</div>';
    }
}
Ejemplo n.º 13
0
 function kleo_frontend_files()
 {
     //head scripts
     wp_register_script('kleo-init', get_template_directory_uri() . '/assets/js/init.js', array(), KLEO_THEME_VERSION, false);
     wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.46504.js', array(), KLEO_THEME_VERSION, false);
     /* Footer scripts */
     wp_register_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('waypoints', get_template_directory_uri() . '/assets/js/plugins/waypoints.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     //wp_register_script( 'pretty-photo', get_template_directory_uri() . '/assets/js/plugins/prettyPhoto/jquery.prettyPhoto.js', array('jquery'),KLEO_THEME_VERSION, true );
     wp_register_script('magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('caroufredsel', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/jquery.carouFredSel-6.2.0-packed.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('jquery-mousewheel', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.mousewheel.min.js', array('jquery', 'caroufredsel'), KLEO_THEME_VERSION, true);
     wp_register_script('jquery-touchswipe', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.touchSwipe.min.js', array('jquery', 'caroufredsel'), KLEO_THEME_VERSION, true);
     wp_register_script('jquery-transit', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.transit.min.js', array('jquery', 'caroufredsel'), KLEO_THEME_VERSION, true);
     wp_register_script('jquery-ba-throttle-debounce', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.ba-throttle-debounce.min.js', array('jquery', 'caroufredsel'), KLEO_THEME_VERSION, true);
     wp_register_script('isotope', get_template_directory_uri() . '/assets/js/plugins/jquery.isotope.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('kleo-scripts', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('kleo-shortcodes', get_template_directory_uri() . '/assets/js/shortcodes.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('app', get_template_directory_uri() . '/assets/js/app.js', array('jquery'), KLEO_THEME_VERSION, true);
     //enque them
     wp_enqueue_script('kleo-init');
     wp_enqueue_script('modernizr');
     wp_enqueue_script('bootstrap');
     wp_enqueue_script('waypoints');
     //wp_enqueue_script('pretty-photo');
     wp_enqueue_script('magnific-popup');
     wp_enqueue_script('caroufredsel');
     wp_enqueue_script('jquery-touchswipe');
     wp_enqueue_script('jquery-transit');
     wp_enqueue_script('jquery-ba-throttle-debounce');
     wp_enqueue_script('mediaelement');
     wp_enqueue_script('isotope');
     wp_enqueue_script('kleo-scripts');
     wp_enqueue_script('kleo-shortcodes');
     wp_enqueue_script('app');
     $retina_logo = sq_option_url('logo_retina') != '' ? sq_option_url('logo_retina') : "";
     if (is_singular() && get_cfield('logo_retina')) {
         $retina_logo = get_cfield('logo_retina');
     }
     $obj_array = array('ajaxurl' => home_url() . '/wp-admin/admin-ajax.php', 'goTop' => sq_option('go_top', 1), 'ajaxSearch' => sq_option('ajax_search', 1), 'alreadyLiked' => sq_option('likes_already', 'You already like this'), 'retinaLogo' => $retina_logo);
     wp_localize_script('app', 'kleoFramework', $obj_array);
     if (is_singular() && comments_open() && get_option('thread_comments')) {
         wp_enqueue_script('comment-reply');
     }
     // Register the styles
     wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-app', get_template_directory_uri() . '/assets/css/app.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-shortcodes', get_template_directory_uri() . '/assets/css/shortcodes.css', array(), KLEO_THEME_VERSION, 'all');
     //wp_register_style( 'pretty-photo', get_template_directory_uri() . '/assets/js/plugins/prettyPhoto/prettyPhoto.css', array(), KLEO_THEME_VERSION, 'all' );
     wp_register_style('magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('mediaelement-skin', get_template_directory_uri() . '/assets/js/plugins/mediaelement/mejs-kleo-skin.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-fonts', get_template_directory_uri() . '/assets/css/embed-fonts.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-style', CHILD_THEME_URI . '/style.css', array(), KLEO_THEME_VERSION, 'all');
     //enque required styles
     wp_enqueue_style('bootstrap');
     wp_enqueue_style('kleo-app');
     wp_enqueue_style('kleo-shortcodes');
     //wp_enqueue_style( 'pretty-photo' );
     wp_enqueue_style('magnific-popup');
     wp_enqueue_style('kleo-fonts');
     wp_enqueue_style('mediaelement');
 }
 /**
  * Adds a specific post's parents to the items array.
  *
  * @since  0.6.0
  * @access public
  * @param  int $post_id The ID of the post to get the parents of.
  * @return void
  */
 public function do_post_parents($post_id)
 {
     $parents = array();
     while ($post_id) {
         /* Get the post by ID. */
         $post = get_post($post_id);
         $page_title = get_the_title($post_id);
         if (get_cfield('custom_title', $post_id) && get_cfield('custom_title', $post_id) != '') {
             $page_title = get_cfield('custom_title', $post_id);
         }
         /* Add the formatted post link to the array of parents. */
         $parents[] = '<a href="' . get_permalink($post_id) . '" title="' . $page_title . '">' . $page_title . '</a>';
         /* If there's no longer a post parent, brea out of the loop. */
         if (0 >= $post->post_parent) {
             break;
         }
         /* Change the post ID to the parent post to continue looping. */
         $post_id = $post->post_parent;
     }
     /* Get the post hierarchy based off the final parent post. */
     $this->do_post_hierarchy($post_id);
     /* Merge the parent items into the items array. */
     $this->items = array_merge($this->items, array_reverse($parents));
 }
Ejemplo n.º 15
0
function kleo_bottom_content()
{
    if (!is_singular()) {
        return false;
    }
    $page_bottom = get_cfield('bottom_content');
    if ($page_bottom != '') {
        echo '<div class="kleo-page-bottom">';
        echo do_shortcode($page_bottom);
        echo '</div>';
    }
}
Ejemplo n.º 16
0
 function kleo_frontend_files()
 {
     $min = sq_option('dev_mode', 0) == 1 ? '' : '.min';
     //head scripts
     wp_register_script('kleo-init', get_template_directory_uri() . '/assets/js/init.js', array(), KLEO_THEME_VERSION, false);
     wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.46504.js', array(), KLEO_THEME_VERSION, false);
     /* Footer scripts */
     wp_register_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap' . $min . '.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('waypoints', get_template_directory_uri() . '/assets/js/plugins/waypoints.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('caroufredsel', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/jquery.carouFredSel-6.2.0-packed.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('jquery-mousewheel', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.mousewheel.min.js', array('jquery', 'caroufredsel'), KLEO_THEME_VERSION, true);
     wp_register_script('jquery-touchswipe', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.touchSwipe.min.js', array('jquery', 'caroufredsel'), KLEO_THEME_VERSION, true);
     wp_register_script('isotope', get_template_directory_uri() . '/assets/js/plugins/jquery.isotope.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('app', get_template_directory_uri() . '/assets/js/app' . $min . '.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('three-canvas', get_template_directory_uri() . '/assets/js/plugins/snow/ThreeCanvas.js', array('app'), KLEO_THEME_VERSION, true);
     wp_register_script('snow', get_template_directory_uri() . '/assets/js/plugins/snow/Snow.js', array('three-canvas'), KLEO_THEME_VERSION, true);
     wp_register_script('particles-js', get_template_directory_uri() . '/assets/js/plugins/particles.min.js', array('jquery'), KLEO_THEME_VERSION, true);
     wp_register_script('bootstrap-multiselect', get_template_directory_uri() . '/assets/js/plugins/bootstrap-multiselect.js', array('jquery'), KLEO_THEME_VERSION, true);
     //enqueue them
     wp_enqueue_script('kleo-init');
     wp_enqueue_script('modernizr');
     wp_enqueue_script('bootstrap');
     wp_enqueue_script('waypoints');
     wp_enqueue_script('magnific-popup');
     wp_enqueue_script('caroufredsel');
     wp_enqueue_script('jquery-touchswipe');
     wp_enqueue_script('mediaelement');
     wp_enqueue_script('isotope');
     wp_enqueue_script('app');
     $regular_logo = sq_option_url('logo', '');
     if (is_singular() && get_cfield('logo')) {
         $regular_logo = get_cfield('logo');
     }
     $retina_logo = sq_option_url('logo_retina') != '' ? sq_option_url('logo_retina') : "";
     if (is_singular() && get_cfield('logo_retina')) {
         $retina_logo = get_cfield('logo_retina');
     }
     $header_height = sq_option('menu_height', 88);
     $obj_array = array('ajaxurl' => admin_url('admin-ajax.php'), 'themeUrl' => get_template_directory_uri(), 'loginUrl' => site_url('wp-login.php', 'login_post'), 'goTop' => sq_option('go_top', 1), 'ajaxSearch' => sq_option('ajax_search', 1), 'alreadyLiked' => sq_option('likes_already', 'You already like this'), 'logo' => $regular_logo, 'retinaLogo' => $retina_logo, 'headerHeight' => $header_height, 'loadingmessage' => '<i class="icon icon-spin5 animate-spin"></i> ' . __('Sending info, please wait...', 'kleo_framework'));
     $obj_array = apply_filters('kleo_localize_app', $obj_array);
     wp_localize_script('app', 'kleoFramework', $obj_array);
     if (is_singular() && comments_open() && get_option('thread_comments')) {
         wp_enqueue_script('comment-reply');
     }
     if (is_child_theme() && file_exists(get_stylesheet_directory() . '/assets/css/fontello.css')) {
         $fonts_path = get_stylesheet_directory_uri() . '/assets/css/fontello.css';
     } else {
         $fonts_path = get_template_directory_uri() . '/assets/css/fontello.css';
     }
     // Register the styles
     wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap' . $min . '.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-app', get_template_directory_uri() . '/assets/css/app' . $min . '.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-fonts', $fonts_path, array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-style', CHILD_THEME_URI . '/style.css', array(), KLEO_THEME_VERSION, 'all');
     wp_register_style('kleo-rtl', get_template_directory_uri() . '/rtl.css', array(), KLEO_THEME_VERSION, 'all');
     //enqueue required styles
     wp_enqueue_style('bootstrap');
     wp_enqueue_style('kleo-app');
     wp_enqueue_style('magnific-popup');
     wp_enqueue_style('kleo-fonts');
     wp_enqueue_style('mediaelement');
 }
Ejemplo n.º 17
0
}
//hide title?
$title_arr['show_title'] = true;
if (is_singular() && 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 (is_singular()) {
    if (get_cfield('hide_breadcrumb') == 1) {
        $title_arr['show_breadcrumb'] = false;
    } else {
        if (get_cfield('hide_breadcrumb') === '0') {
            $title_arr['show_breadcrumb'] = true;
        }
    }
}
//extra info
if (is_singular() && get_cfield('hide_info') == 1 || sq_option('title_info', '') == '') {
    $title_arr['extra'] = '';
}
if (isset($title_arr['show_breadcrumb']) && $title_arr['show_breadcrumb'] || !isset($title_arr['extra']) || $title_arr['show_title']) {
    echo kleo_title_section($title_arr);
}
Ejemplo n.º 18
0
    if (get_cfield('title_checkbox', $current_page_id) == 1) {
        $title_arr['show_title'] = false;
    }
    //hide breadcrumb?
    if (sq_option('breadcrumb_status', 1) == 0) {
        $title_arr['show_breadcrumb'] = false;
    }
    if (get_cfield('hide_breadcrumb', $current_page_id) == 1) {
        $title_arr['show_breadcrumb'] = false;
    } else {
        if (get_cfield('hide_breadcrumb', $current_page_id) === '0') {
            $title_arr['show_breadcrumb'] = true;
        }
    }
    //hide extra info?
    if (get_cfield('hide_info', $current_page_id) == 1) {
        $title_arr['extra'] = '';
    }
}
/* disable Profile page breadcrumb option */
if (bp_is_user() && sq_option('bp_profile_breadcrumb_disable', 0) == 1) {
    $title_arr['show_breadcrumb'] = false;
    $title_arr['show_title'] = false;
    $title_arr['extra'] = '';
}
if (isset($title_arr['show_breadcrumb']) && $title_arr['show_breadcrumb'] == false && isset($title_arr['show_title']) && $title_arr['extra'] == '') {
    //hide the breadcrumb section
} else {
    echo kleo_title_section($title_arr);
}
?>
        if (!empty($audio)) {
            ?>
					<div class="post-audio">
						<audio preload="none" class="kleo-audio" id="audio_<?php 
            the_id();
            ?>
" style="width:100%;" src="<?php 
            echo $audio;
            ?>
"></audio>
					</div>
					<?php 
        }
        break;
    case 'gallery':
        $slides = get_cfield('slider');
        echo '<div class="kleo-banner-slider">' . '<div class="kleo-banner-items" data-speed="2000">';
        if ($slides) {
            foreach ($slides as $slide) {
                if ($slide) {
                    $image = aq_resize($slide, $kleo_config['post_gallery_img_width'], $kleo_config['post_gallery_img_height'], true, true, true);
                    //small hack for non-hosted images
                    if (!$image) {
                        $image = $slide;
                    }
                    echo '<article>
								<a href="' . $slide . '" data-rel="modalPhoto[inner-gallery]">
									<img src="' . $image . '" alt="' . get_the_title() . '">' . kleo_get_img_overlay() . '</a>
							</article>';
                }
            }
Ejemplo n.º 20
0
    /**
     * Return post media by format
     *
     * @param $post_format
     * @param $options
     * @return string
     *
     * @since 3.0
     */
    function kleo_get_post_media($post_format = 'standard', $options = array())
    {
        global $kleo_config;
        if (isset($options['icons']) && $options['icons']) {
            $icons = true;
        } else {
            $icons = false;
        }
        if (isset($options['media_width']) && isset($options['media_height'])) {
            $media_width = $options['media_width'];
            $media_height = $options['media_height'];
        } else {
            $media_width = $kleo_config['post_gallery_img_width'];
            $media_height = $kleo_config['post_gallery_img_height'];
        }
        $output = '';
        switch ($post_format) {
            case 'video':
                //oEmbed video
                $video = get_cfield('embed');
                // video bg self hosted
                $bg_video_args = array();
                $k_video = '';
                if (get_cfield('video_mp4')) {
                    $bg_video_args['mp4'] = get_cfield('video_mp4');
                }
                if (get_cfield('video_ogv')) {
                    $bg_video_args['ogv'] = get_cfield('video_ogv');
                }
                if (get_cfield('video_webm')) {
                    $bg_video_args['webm'] = get_cfield('video_webm');
                }
                if (!empty($bg_video_args)) {
                    $attr_strings = array('preload="none"');
                    if (get_cfield('video_poster')) {
                        $attr_strings[] = 'poster="' . get_cfield('video_poster') . '"';
                    }
                    $k_video .= '<div class="kleo-video-wrap"><video ' . join(' ', $attr_strings) . ' controls="controls" class="kleo-video" style="width: 100%; height: 100%;">';
                    $source = '<source type="%s" src="%s" />';
                    foreach ($bg_video_args as $video_type => $video_src) {
                        $video_type = wp_check_filetype($video_src, wp_get_mime_types());
                        $k_video .= sprintf($source, $video_type['type'], esc_url($video_src));
                    }
                    $k_video .= '</video></div>';
                    $output .= $k_video;
                } elseif (!empty($video)) {
                    global $wp_embed;
                    $output .= apply_filters('kleo_oembed_video', $video);
                }
                break;
            case 'audio':
                $audio = get_cfield('audio');
                if (!empty($audio)) {
                    $output .= '<div class="post-audio">' . '<audio preload="none" class="kleo-audio" id="audio_' . get_the_ID() . '" style="width:100%;" src="' . $audio . '"></audio>' . '</div>';
                }
                break;
            case 'gallery':
                $slides = get_cfield('slider');
                $output .= '<div class="kleo-banner-slider">' . '<div class="kleo-banner-items" >';
                if ($slides) {
                    foreach ($slides as $slide) {
                        if ($slide) {
                            $image = aq_resize($slide, $media_width, $media_height, true, true, true);
                            //small hack for non-hosted images
                            if (!$image) {
                                $image = $slide;
                            }
                            $output .= '<article>
								<a href="' . $slide . '" data-rel="modalPhoto[inner-gallery]">
									<img src="' . $image . '" alt="' . get_the_title() . '">' . kleo_get_img_overlay() . '</a>
							</article>';
                        }
                    }
                }
                $output .= '</div>' . '<a href="#" class="kleo-banner-prev"><i class="icon-angle-left"></i></a>' . '<a href="#" class="kleo-banner-next"><i class="icon-angle-right"></i></a>' . '<div class="kleo-banner-features-pager carousel-pager"></div>' . '</div>';
                break;
            case 'aside':
                if ($icons) {
                    $output .= '<div class="post-format-icon"><i class="icon icon-doc"></i></div>';
                }
                break;
            case 'link':
                if ($icons) {
                    $output .= '<div class="post-format-icon"><i class="icon icon-link"></i></div>';
                }
                break;
            case 'quote':
                if ($icons) {
                    $output .= '<div class="post-format-icon"><i class="icon icon-quote-right"></i></div>';
                }
                break;
            case 'image':
            default:
                if (kleo_get_post_thumbnail_url() != '') {
                    $output .= '<div class="post-image">';
                    $img_url = kleo_get_post_thumbnail_url();
                    $image = aq_resize($img_url, $media_width, $media_height, true, true, true);
                    if (!$image) {
                        $image = $img_url;
                    }
                    $output .= '<a href="' . get_permalink() . '" class="element-wrap">' . '<img src="' . $image . '" alt="' . get_the_title() . '">' . kleo_get_img_overlay() . '</a>';
                    $output .= '</div><!--end post-image-->';
                } elseif ($icons) {
                    $post_icon = $post_format == 'image' ? 'picture' : 'doc';
                    $output .= '<div class="post-format-icon"><i class="icon icon-' . $post_icon . '"></i></div>';
                }
                break;
        }
        return $output;
    }
Ejemplo n.º 21
0
function kleo_bp_set_custom_menu($args = '')
{
    $page_id = kleo_bp_get_component_id();
    if ($page_id) {
        $menuslug = get_cfield('page_menu', $page_id);
        if (!empty($menuslug) && $menuslug != 'default' && is_nav_menu($menuslug)) {
            $args['menu'] = $menuslug;
        }
    }
    return $args;
}