<?php /** * Slider or custom content between the menu and the page title * * @package wpv * @subpackage church-event */ global $wp_embed; $post_id = wpv_get_the_ID(); $content = WpvTemplates::has_header_slider() ? '' : do_shortcode($wp_embed->run_shortcode(wpv_post_meta($post_id, 'page-middle-header-content', true))); $fullwidth = wpv_post_meta($post_id, 'page-middle-header-content-fullwidth', true) === 'true'; $min_height = wpv_post_meta($post_id, 'page-middle-header-min-height', true); if (!WpvTemplates::has_header_slider() && empty($content) && empty($min_height) && !WpvFancyPortfolio::has('disabled')) { return; } if (is_page_template('page-blank.php')) { return; } $style = WpvTemplates::get_title_style(); if (!WpvTemplates::has_header_slider()) { $style .= "min-height:{$min_height}px"; } $type = WpvTemplates::has_header_slider() ? 'type-slider' : 'type-featured'; ?> <header class="header-middle row <?php echo $fullwidth ? 'fullwidth' : 'normal'; ?> <?php echo $type; ?>
correct_height *= win_width / WPV_FRONT.content_width; $.WPV.PortfolioSlider.init(<?php echo json_encode($data); ?> , { resizing: '<?php echo $fancy_portfolio_resizing; ?> ', height: correct_height }); }); </script> <?php echo WPV_Portfolio::shortcode(array('column' => 4, 'cat' => WpvFancyPortfolio::get_categories(), 'ids' => '', 'max' => -1, 'title' => 'overlay', 'desc' => false, 'more' => get_post_meta($post->ID, 'fancy-portfolio-more', true), 'nopaging' => 'true', 'group' => 'true', 'layout' => 'fit-rows', 'class' => 'ajax-portfolio-items', 'fancy_page' => true)); wp_enqueue_script('vamtam-portfolioslider'); } ?> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'church-event'), 'after' => '</div>')); ?> <?php WpvTemplates::share('page'); ?> </div>
function theme_body_classes($body_class) { global $wpv_has_header_sidebars, $post, $wpv_is_shortcode_preview; $is_blank_page = is_page_template('page-blank.php'); $has_header_slider = WpvTemplates::has_header_slider(); $wpv_has_header_sidebars = wpv_post_meta_default('show_header_sidebars', 'has-header-sidebars') && WpvFancyPortfolio::has('disabled'); $has_page_header = (WpvTemplates::has_page_header() || WpvTemplates::has_post_siblings_buttons()) && !is_404(); $full_bg_slider = WpvFancyPortfolio::has('background'); $ajax_portfolio = WpvFancyPortfolio::has('page'); $body_class[] = $full_bg_slider || $is_blank_page ? 'full' : wpv_get_option('site-layout-type'); $body_class[] = 'pagination-' . wpv_get_option('pagination-type'); $body_class[] = is_singular(array('post', 'page', 'portfolio', 'wpv_sermon', 'tribe_events')) ? 'sticky-header-type-' . wpv_post_meta(null, 'sticky-header-type', true) : ''; $body_class[] = 'wpv-not-scrolled'; $body_class_conditions = array('no-page-header' => !$has_page_header, 'has-page-header' => $has_page_header, 'cbox-share-twitter' => wpv_get_optionb('share-lightbox-twitter'), 'cbox-share-facebook' => wpv_get_optionb('share-lightbox-facebook'), 'cbox-share-googleplus' => wpv_get_optionb('share-lightbox-googleplus'), 'cbox-share-pinterest' => wpv_get_optionb('share-lightbox-pinterest'), 'fixed-header' => wpv_get_optionb('fixed-header'), 'has-header-slider' => $has_header_slider, 'has-header-sidebars' => $wpv_has_header_sidebars, 'no-header-slider' => !$has_header_slider, 'no-header-sidebars' => !$wpv_has_header_sidebars, 'no-footer-sidebars' => !wpv_get_optionb('has-footer-sidebars'), 'responsive-layout' => WPV_RESPONSIVE, 'fixed-layout' => !WPV_RESPONSIVE, 'full-bg-slider' => $full_bg_slider, 'fast-slider' => $full_bg_slider, 'has-ajax-portfolio' => $ajax_portfolio, 'has-breadcrumbs' => wpv_get_optionb('enable-breadcrumbs'), 'no-breadcrumbs' => !wpv_get_optionb('enable-breadcrumbs'), 'no-slider-button-thumbnails' => !wpv_get_optionb('header-slider-button-thumbnails'), 'sticky-header' => wpv_get_optionb('sticky-header') && !$full_bg_slider && !$ajax_portfolio, 'no-page-bottom-padding' => is_singular() && wpv_post_meta(null, 'use-page-bottom-padding', true) == 'false', 'vamtam-shortcode-tooltip-preview' => $wpv_is_shortcode_preview && strpos($GLOBALS['current_wpv_shortcode'], '[tooltip') !== false); foreach ($body_class_conditions as $class => $cond) { if ($cond) { $body_class[] = $class; } } if (is_archive() || is_search() || get_query_var('format_filter')) { define('WPV_ARCHIVE_TEMPLATE', true); } return $body_class; }
<?php /** * Background portfolio controls * * @package wpv * @subpackage church-event */ $data = WpvFancyPortfolio::get(); ?> <script>wpvBgSlides = <?php echo json_encode($data); ?> ;</script> <div class="fast-slider-gall-prev icon theme"><b><?php wpv_icon('theme-arrow-left3'); ?> </b></div> <div class="fast-slider-gall-next icon theme"><b><?php wpv_icon('theme-arrow-right3'); ?> </b></div> <div class="fast-slider-navbar"> <div class="limit-wrapper"> <div class="title"> <h1 class="fast-slider-caption"></h1> <nav class="fast-slider-arrows"> <div class="fast-slider-next icon theme"><b><?php wpv_icon('theme-arrow-right3'); ?> </b></div>
/** * Checks whether the current page has a header slider * @return boolean true if there is a header slider */ public static function has_header_slider() { $post_id = wpv_get_the_ID(); return !is_null($post_id) && apply_filters('wpv_has_header_slider', !is_404() && wpv_post_meta($post_id, 'slider-category', true) !== '' && WpvFancyPortfolio::has('disabled') && !is_page_template('page-blank.php')); }
/** * Initializes the ajax portfolio */ public static function init_ajax() { if (WpvFancyPortfolio::has('page')) { get_template_part('templates/ajax-portfolio-viewer'); } }