Beispiel #1
0
function folio_team_post($atts, $content = null)
{
    $output = $thumbs = $stats = $description = $social = '';
    //enqueue bx slider style and script
    extract(shortcode_atts(array('display_members' => '', 'display_selected' => '', 'show_next_prev' => '', 'el_class' => ''), $atts));
    if ($display_selected) {
        $display_selected = explode(',', $display_selected);
    }
    ob_start();
    if (isset($display_selected) && count($display_selected > 0)) {
        $args = array('post_type' => 'folio_team', 'posts_per_page' => $display_members, 'post__in' => $display_selected);
    } else {
        $args = array('post_type' => 'folio_team', 'posts_per_page' => $display_members);
    }
    $query = new WP_Query($args);
    $total_posts = $query->found_posts;
    $count = 1;
    $carouselId = folio_random_id(5);
    $sliderId = folio_random_id(6);
    $key_team = wp_generate_password(5, false, false);
    $key_stat = wp_generate_password(5, false, false);
    wp_enqueue_script('flexslider_js');
    wp_enqueue_script('custom_team_js');
    wp_localize_script('custom_team_js', 'folio_carousel_' . $key_team, array('carouselId' => $carouselId, 'sliderId' => $sliderId, 'show_next_prev' => $show_next_prev));
    if ($query->have_posts()) {
        ?>

                <!-- team_carousel starts -->
<div id="carousel_<?php 
        echo $carouselId;
        ?>
" class="team_carousel" data-key = "<?php 
        echo $key_team;
        ?>
">
    <ul class="slides">
<?php 
        while ($query->have_posts()) {
            $query->the_post();
            if (has_post_thumbnail(get_the_ID())) {
                $designation = get_post_meta(get_the_ID(), 'folio_designation', true);
                $skills = get_post_meta(get_the_ID(), 'folio_add_skill', true);
                $socials['fa-facebook'] = get_post_meta(get_the_ID(), 'folio_facebook', true);
                $socials['fa-linkedin'] = get_post_meta(get_the_ID(), 'folio_linkedin', true);
                $socials['fa-twitter'] = get_post_meta(get_the_ID(), 'folio_twitter', true);
                $socials['fa-google-plus'] = get_post_meta(get_the_ID(), 'folio_googleplus', true);
                ?>
		 <?php 
                if (count($skills) > 1) {
                    foreach ($skills as $skill) {
                        $skill_name = $skill['folio_re_skill_name'];
                        $skill_percentage = $skill['folio_re_skill_percentage'];
                        $stats .= '<span class="team_stats">
						<span class="stats_bar_holder">
							<span class="stats_bar" data-percent="' . $skill_percentage . '"></span>
						</span>
						<span class="stats_title">' . $skill_name . '</span>
					</span>';
                    }
                }
                ?>

            <li>
            <img src="<?php 
                echo aq_resize(folio_get_featured_image(get_the_id()), 291, 310, true);
                ?>
" alt="<?php 
                the_title();
                ?>
" />
                <div class="member_basic">
                    <h3 class="member_name"><?php 
                the_title();
                ?>
</h3>
                    <p class="member_designation"><?php 
                echo $designation;
                ?>
</p>
                </div>
            </li>
<?php 
                foreach ($socials as $class => $link) {
                    if (!empty($link)) {
                        $social .= '<li><a href="' . $link . '"><i class="fa ' . $class . '"></i></a></li>';
                    }
                }
                $description .= '<li>
					<div class="col-sm-3">
						' . $stats . '
						<ul class="team_social">
							' . $social . '
						</ul>
					</div>
					<div class="col-xs-offset-1 col-sm-7 team_description">
						' . get_the_content() . '
					</div>
				</li>';
                $stats = '';
                $social = '';
                ?>
    	<?php 
            }
            ?>
	<?php 
        }
        ?>
    </ul>
</div>
<!-- team_carousel ends -->
<!-- team_slider starts -->
    <div class="row">
        <div class="col-sm-12">
            <div class="row">
                <div id="slider_<?php 
        echo $sliderId;
        ?>
" class="team_slider">
                    <ul class="slides">
                        <?php 
        echo $description;
        ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
                <!-- team_slider ends -->
<?php 
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Beispiel #2
0
}
/* Checking is google map is CURVE or not RegExp Matching */
if (!is_array(folio_match_expression('is_curve_header', $content, 'attr'))) {
    $is_curve = folio_match_expression('is_curve_header', $content, 'attr');
}
if ($section_type === 'main_section' && isset($map) && $map === 'full' || isset($slider) && $slider != NULL) {
    if (isset($map) && $map !== '') {
        $class = 'class="sec-map"';
    }
    if (isset($slider) && $slider !== '' && $is_curve === 'yes') {
        $class = 'class="zee_curve_container zee_b_curve_container"';
    }
    $output .= '<section ' . $section_id_string . ' ' . $class . '>';
    /* Parallex Section Starts*/
} elseif ($section_type === 'parallex_section') {
    $parallax_id = 'parallax-' . folio_random_id(3);
    wp_enqueue_script('parallax_js');
    wp_enqueue_script('localscroll_js');
    ?>
	
		<script type="text/javascript">
            jQuery(document).ready(function($){
                "use strict";
                    /* Parallax Quote Start */
					jQuery(window).scroll(function(event) {
							// check current parallax is visible and parallax_visible class available?
							// if not then invoke parallax function on it and add class
						if (jQuery('#<?php 
    echo $parallax_id;
    ?>
').visible(true)) {