Example #1
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $tax_terms = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'category' => '', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // CLIENTS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $client_args = array('post_type' => 'clients', 'post_status' => 'publish', 'paged' => $paged, 'clients-category' => $category_slug, 'posts_per_page' => $item_count);
     $clients_items = new WP_Query($client_args);
     $items .= '<ul class="clients-items clearfix">';
     $client_width = 124;
     $client_height = 124;
     // CLIENTS LOOP
     while ($clients_items->have_posts()) {
         $clients_items->the_post();
         $client_image = get_post_thumbnail_id();
         $client_img_url = wp_get_attachment_url($client_image, 'full');
         $client_link_url = get_post_meta($post->ID, 'sf_client_link', true);
         $items .= '<li class="clearfix client-item">';
         $items .= '<figure>';
         $image = aq_resize($client_img_url, $client_width, $client_height, true, false);
         if ($image) {
             if ($client_link_url) {
                 $items .= '<a href="' . $client_link_url . '" target="_blank"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a>';
             } else {
                 $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
             }
         }
         $items .= '</figure>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($clients_items);
         $items .= '</div>';
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_clients_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper clients-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
Example #2
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', "item_count" => '12', "category" => '', 'pagination' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $team_args = array('post_type' => 'team', 'post_status' => 'publish', 'paged' => $paged, 'team-category' => $category_slug, 'posts_per_page' => $item_count, 'ignore_sticky_posts' => 1);
     $team_members = new WP_Query($team_args);
     $count = 0;
     $items .= '<ul class="team-members clearfix">';
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $member_name = get_the_title();
         $member_position = get_post_meta($post->ID, 'sf_team_member_position', true);
         $member_image = get_post_thumbnail_id();
         $member_page_link = get_permalink();
         $items .= '<li data-id="id-' . $count . '" class="clearfix team-member four columns">';
         $img_url = wp_get_attachment_url($member_image, 'full');
         $image = aq_resize($img_url, 220, 298, true, false);
         $items .= '<figure>';
         if ($image) {
             $items .= '<a href="' . $member_page_link . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $member_name . '" /></a>';
         }
         $items .= '</figure>';
         $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
         $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
         $items .= '<a class="read-more" href="' . $member_page_link . '">' . __("Find out more", "swiftframework") . '<i class="icon-chevron-right"></i></a>';
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading">' . $title . '</h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
Example #3
0
 public function content($atts, $content = null)
 {
     $title = $order = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'order' => '', 'category' => '', 'pagination' => 'no', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // JOBS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $jobs_args = array('orderby' => $order, 'post_type' => 'jobs', 'post_status' => 'publish', 'paged' => $paged, 'jobs-category' => $category_slug, 'posts_per_page' => $item_count);
     $jobs = new WP_Query($jobs_args);
     $items .= '<ul class="jobs clearfix">';
     // PORTFOLIO LOOP
     while ($jobs->have_posts()) {
         $jobs->the_post();
         $job_title = get_the_title();
         $job_text = get_the_content();
         $items .= '<li class="job">';
         $items .= '<h3>' . $job_title . '</h3>';
         $items .= '<div class="job-text">' . do_shortcode($job_text) . '</div>';
         $items .= '</li>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($jobs);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper jobs-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h3></div>' : '';
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
Example #4
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $filter = $social_icon_type = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_columns' => '3', "item_count" => '12', "category" => '', 'social_icon_type' => 'dark', 'pagination' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $team_args = array('post_type' => 'team', 'post_status' => 'publish', 'paged' => $paged, 'team-category' => $category_slug, 'posts_per_page' => $item_count, 'ignore_sticky_posts' => 1);
     $team_members = new WP_Query($team_args);
     $count = 0;
     $image_width = 270;
     $image_height = 270;
     if ($item_columns == "1") {
         $item_class = 'col-sm-12';
     } else {
         if ($item_columns == "2") {
             $image_width = 540;
             $image_height = 540;
             $item_class = 'col-sm-6';
         } else {
             if ($item_columns == "3") {
                 $image_width = 360;
                 $image_height = 360;
                 $item_class = 'col-sm-4';
             } else {
                 $item_class = 'col-sm-3';
             }
         }
     }
     $items .= '<ul class="team-members row clearfix">';
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $member_name = get_the_title();
         $member_position = sf_get_post_meta($post->ID, 'sf_team_member_position', true);
         $member_bio = get_the_content();
         $custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
         if ($custom_excerpt != "") {
             $member_bio = sf_custom_excerpt($custom_excerpt, 1000);
         }
         $member_email = sf_get_post_meta($post->ID, 'sf_team_member_email', true);
         $member_phone = sf_get_post_meta($post->ID, 'sf_team_member_phone_number', true);
         $member_twitter = sf_get_post_meta($post->ID, 'sf_team_member_twitter', true);
         $member_facebook = sf_get_post_meta($post->ID, 'sf_team_member_facebook', true);
         $member_linkedin = sf_get_post_meta($post->ID, 'sf_team_member_linkedin', true);
         $member_google_plus = sf_get_post_meta($post->ID, 'sf_team_member_google_plus', true);
         $member_skype = sf_get_post_meta($post->ID, 'sf_team_member_skype', true);
         $member_instagram = sf_get_post_meta($post->ID, 'sf_team_member_instagram', true);
         $member_dribbble = sf_get_post_meta($post->ID, 'sf_team_member_dribbble', true);
         $member_xing = sf_get_post_meta($post->ID, 'sf_team_member_xing', true);
         $member_image = get_post_thumbnail_id();
         $member_link = get_permalink();
         $items .= '<li itemscope data-id="id-' . $count . '" class="clearfix team-member ' . $item_class . '">';
         $img_url = wp_get_attachment_url($member_image, 'full');
         $image = sf_aq_resize($img_url, $image_width, $image_height, true, false);
         $items .= '<figure class="gallery-style">';
         if ($image) {
             $items .= '<a href="' . get_permalink() . '"><img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a>';
         }
         $items .= '<figcaption>';
         $items .= '<h5 class="team-member-name">' . $member_name . '</h5>';
         $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
         if ($member_twitter || $member_facebook || $member_linkedin || $member_google_plus || $member_skype || $member_instagram || $member_dribbble || $member_xing != "") {
             $items .= '<ul class="social-icons">';
             if ($member_twitter) {
                 $items .= '<li class="twitter"><a href="http://www.twitter.com/' . $member_twitter . '" target="_blank"><i class="fa-twitter"></i><i class="fa-twitter"></i></a></li>';
             }
             if ($member_facebook) {
                 $items .= '<li class="facebook"><a href="' . $member_facebook . '" target="_blank"><i class="fa-facebook"></i><i class="fa-facebook"></i></a></li>';
             }
             if ($member_linkedin) {
                 $items .= '<li class="linkedin"><a href="' . $member_linkedin . '" target="_blank"><i class="fa-linkedin"></i><i class="fa-linkedin"></i></a></li>';
             }
             if ($member_google_plus) {
                 $items .= '<li class="googleplus"><a href="' . $member_google_plus . '" target="_blank"><i class="fa-google-plus"></i><i class="fa-google-plus"></i></a></li>';
             }
             if ($member_skype) {
                 $items .= '<li class="skype"><a href="skype:' . $member_skype . '" target="_blank"><i class="fa-skype"></i><i class="fa-skype"></i></a></li>';
             }
             if ($member_instagram) {
                 $items .= '<li class="instagram"><a href="' . $member_instagram . '" target="_blank"><i class="fa-instagram"></i><i class="fa-instagram"></i></a></li>';
             }
             if ($member_dribbble) {
                 $items .= '<li class="dribbble"><a href="http://www.dribbble.com/' . $member_dribbble . '" target="_blank"><i class="fa-dribbble"></i><i class="fa-dribbble"></i></a></li>';
             }
             if ($member_xing) {
                 $items .= '<li class="xing"><a href="' . $member_xing . '" target="_blank"><i class="fa-xing"></i><i class="fa-xing"></i></a></li>';
             }
             $items .= '</ul>';
         }
         $items .= '</figcaption>';
         $items .= '</figure>';
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $sf_include_isotope, $sf_has_team;
     $sf_include_isotope = true;
     $sf_has_team = true;
     return $output;
 }
Example #5
0
	<?php 
if ($pagination == "infinite-scroll") {
    global $sf_include_infscroll;
    $sf_include_infscroll = true;
    $pagination_output .= '<div class="pagination-wrap hidden">';
    $pagination_output .= pagenavi($wp_query);
    $pagination_output .= '</div>';
} else {
    if ($pagination == "load-more") {
        global $sf_include_infscroll;
        $sf_include_infscroll = true;
        $pagination_output .= '<a href="#" class="load-more-btn">' . __('Load More', 'swiftframework') . '</a>';
        $pagination_output .= '<div class="pagination-wrap load-more hidden">';
        $pagination_output .= pagenavi($wp_query);
        $pagination_output .= '</div>';
    } else {
        if ($pagination == "standard") {
            if ($blog_type == "masonry") {
                $pagination_output .= '<div class="pagination-wrap masonry-pagination">';
            } else {
                $pagination_output .= '<div class="pagination-wrap">';
            }
            $pagination_output .= pagenavi($wp_query);
            $pagination_output .= '</div>';
        }
    }
}
echo $pagination_output;
?>

</div>
Example #6
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $carousel_auto = $output = $tax_terms = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'category' => '', 'carousel' => '', 'carousel_columns' => '', 'carousel_auto' => 'no', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // CLIENTS QUERY SETUP
     global $post, $wp_query, $sf_carouselID;
     if ($sf_carouselID == "") {
         $sf_carouselID = 1;
     } else {
         $sf_carouselID++;
     }
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $client_args = array('post_type' => 'clients', 'post_status' => 'publish', 'paged' => $paged, 'clients-category' => $category_slug, 'posts_per_page' => $item_count);
     $clients_items = new WP_Query($client_args);
     global $column_width;
     $item_size_class = "span2";
     if ($width == "1/4") {
         $columns = 1;
         $item_size_class = 'span3';
     } else {
         if ($width == "1/3") {
             $columns = 2;
             $item_size_class = 'span2';
         } else {
             if ($width == "1/2") {
                 $columns = 3;
                 $item_size_class = 'span2';
             } else {
                 if ($width == "2/3") {
                     $columns = 4;
                     $item_size_class = 'span2';
                 } else {
                     if ($width == "3/4") {
                         $columns = 3;
                         $item_size_class = 'span3';
                     } else {
                         if ($column_width != "") {
                             if ($column_width == "1/3") {
                                 $columns = 2;
                             } else {
                                 if ($column_width == "1/2") {
                                     $columns = 3;
                                 } else {
                                     if ($column_width == "3/4") {
                                         $columns = 4;
                                     } else {
                                         $columns = 6;
                                     }
                                 }
                             }
                         } else {
                             $columns = 6;
                         }
                     }
                 }
             }
         }
     }
     $auto = false;
     if ($carousel_auto == "yes") {
         $auto = true;
     }
     if ($carousel == "yes" || $carousel == "") {
         $items .= '<div class="carousel-wrap">';
         $items .= '<div id="carousel-' . $sf_carouselID . '" class="clients carousel-items clearfix" data-columns="' . $columns . '" data-auto="' . $auto . '">';
     } else {
         $items .= '<div class="carousel-grid row">';
     }
     $client_width = apply_filters('sf_clients_image_width', 200);
     $client_height = apply_filters('sf_clients_image_height', 200);
     // CLIENTS LOOP
     while ($clients_items->have_posts()) {
         $clients_items->the_post();
         $client_image = get_post_thumbnail_id();
         $client_img_url = wp_get_attachment_url($client_image, 'full');
         $client_link_url = sf_get_post_meta($post->ID, 'sf_client_link', true);
         $client_link_same_window = sf_get_post_meta($post->ID, 'sf_client_link_same_window', true);
         $image_alt = esc_attr(sf_get_post_meta($client_image, '_wp_attachment_image_alt', true));
         $target = "_blank";
         $items .= '<div class="clearfix carousel-item client-item ' . $item_size_class . '">';
         $items .= '<figure>';
         $image = sf_aq_resize($client_img_url, $client_width, $client_height, true, false);
         if ($image) {
             if ($client_link_url) {
                 if ($client_link_same_window) {
                     $target = "_self";
                 }
                 $items .= '<a href="' . $client_link_url . '" target="' . $target . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" /></a>';
             } else {
                 $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" />';
             }
         }
         $items .= '</figure>';
         $items .= '</div>';
     }
     wp_reset_postdata();
     if ($carousel == "yes" || $carousel == "") {
         $items .= '</div>';
         $items .= '<a href="#" class="carousel-prev"><i class="ss-navigateleft"></i></a><a href="#" class="carousel-next"><i class="ss-navigateright"></i></a>';
         $options = get_option('sf_dante_options');
         if ($options['enable_swipe_indicators']) {
             $items .= '<div class="sf-swipe-indicator"></div>';
         }
         $items .= '</div>';
     } else {
         $items .= '</ul>';
         // PAGINATION
         if ($pagination == "yes") {
             $items .= '<div class="pagination-wrap">';
             $items .= pagenavi($clients_items);
             $items .= '</div>';
         }
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="spb_clients_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper clients-wrap carousel-wrap alt-nav">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading spb-text-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $sf_include_carousel;
     $sf_include_carousel = true;
     return $output;
 }
Example #7
0
 function sf_blog_items($atts)
 {
     extract(shortcode_atts(array('blog_type' => '', 'gutters' => '', 'columns' => '', 'fullwidth' => '', 'show_title' => '', 'show_excerpt' => '', 'show_details' => '', 'offset' => '', 'order_by' => 'date', 'order' => 'DESC', 'excerpt_length' => '', 'show_read_more' => '', 'item_count' => '', 'category' => '', 'exclude_categories' => '', 'pagination' => '', 'social_integration' => '', 'twitter_username' => '', 'instagram_id' => '', 'instagram_token' => '', 'insta_item_count' => '', 'tweet_item_count' => '', 'blog_filter' => '', 'alt_styling' => '', 'hover_style' => '', 'content_output' => '', 'post_type' => '', 'width' => ''), $atts));
     $blog_items_output = "";
     global $sf_options, $sf_sidebar_config;
     /* CATEGORY SLUG MODIFICATION
        ================================================== */
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     /* BLOG QUERY SETUP
        ================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
         $offset = $offset + $item_count * ($paged - 1);
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
         $offset = $offset + $item_count * ($paged - 1);
     } else {
         $paged = 1;
     }
     if ($post_type == "") {
         $post_type = "post";
     }
     $blog_args = array();
     $category_array = explode(",", $category_slug);
     if (isset($category_array) && $category_array[0] != "") {
         $blog_args = array('post_type' => $post_type, 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $order, 'orderby' => $order_by, 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $category_array)));
     } else {
         $blog_args = array('post_type' => $post_type, 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $order, 'orderby' => $order_by);
     }
     $blog_items = new WP_Query($blog_args);
     /* LIST CLASS CONFIG
        ================================================== */
     $list_class = $wrap_class = '';
     if ($blog_type == "masonry") {
         $list_class .= 'masonry-items';
         if ($gutters == "no") {
             $list_class .= ' no-gutters';
         } else {
             $list_class .= ' gutters';
         }
         // Thumb Type
         if ($hover_style == "default" && function_exists('sf_get_thumb_type')) {
             $list_class .= ' ' . sf_get_thumb_type();
         } else {
             $list_class .= ' thumbnail-' . $hover_style;
         }
     } else {
         if ($blog_type == "bold") {
             $list_class .= 'bold-items';
         } else {
             if ($blog_type == "mini") {
                 $list_class .= 'mini-items';
             } else {
                 if ($blog_type == "timeline") {
                     $list_class .= 'timeline-items';
                     if ($sf_sidebar_config == "no-sidebars") {
                         $wrap_class .= apply_filters('sf_timeline_blog_nosidebars_wrap_class', 'col-sm-8 col-sm-offset-2');
                     }
                 } else {
                     $list_class .= 'standard-items row';
                 }
             }
         }
     }
     if ($alt_styling == "yes") {
         $list_class .= ' alt-styling';
     }
     if ($pagination == "infinite-scroll") {
         $list_class .= ' blog-inf-scroll';
     }
     /* BLOG ITEMS OUTPUT
        ================================================== */
     $blog_items_output .= '<div class="blog-items-wrap blog-' . $blog_type . ' ' . $wrap_class . '">';
     if ($blog_type == "timeline") {
         $blog_items_output .= '<div class="timeline"></div>';
     }
     if ($social_integration == "yes" && $pagination == "none" && ($twitter_username != "" || $instagram_id != "")) {
         $blog_items_output .= '<ul class="blog-items ' . $list_class . ' social-blog clearfix" data-blog-type="' . $blog_type . '">';
     } else {
         $blog_items_output .= '<ul class="blog-items ' . $list_class . ' clearfix" data-blog-type="' . $blog_type . '">';
     }
     while ($blog_items->have_posts()) {
         $blog_items->the_post();
         $post_format = get_post_format($post->ID);
         if ($post_format == "") {
             $post_format = 'standard';
         }
         if ($blog_type == "mini" || $blog_type == "standard" || $blog_type == "timeline") {
             $item_class = "col-sm-12";
         } else {
             if ($blog_type == "masonry" && $fullwidth == "yes") {
                 $item_class = "col-sm-3";
             } else {
                 if ($blog_type == "masonry") {
                     if ($columns == "5") {
                         $item_class = "col-sm-sf-5";
                     } else {
                         if ($columns == "4") {
                             $item_class = "col-sm-3";
                         } else {
                             if ($columns == "3") {
                                 $item_class = "col-sm-4";
                             } else {
                                 if ($columns == "2") {
                                     $item_class = "col-sm-6";
                                 } else {
                                     if ($columns == "1") {
                                         $item_class = "col-sm-12";
                                     }
                                 }
                             }
                         }
                     }
                 } else {
                     $item_class = "col-sm-12";
                 }
             }
         }
         $taxonomy_name = 'category';
         if ($post_type != "post") {
             $taxonomy_name = $post_type . '-category';
         }
         $post_terms = get_the_terms($post->ID, $taxonomy_name);
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . $post_term->slug . ' ';
             }
         }
         /* BLOG ITEM OUTPUT
            ================================================== */
         $blog_items_output .= '<li itemscope itemtype="http://schema.org/BlogPosting" class="blog-item ' . $item_class . ' ' . $term_slug . ' ' . implode(' ', get_post_class()) . '" id="' . get_the_ID() . '" data-date="' . get_the_time('U') . '">';
         $blog_items_output .= sf_get_post_item($post->ID, $blog_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more, $fullwidth);
         $blog_items_output .= '</li>';
     }
     wp_reset_query();
     wp_reset_postdata();
     $blog_items_output .= '</ul>';
     /* SOCIAL INTEGRATION
        ================================================== */
     if ($social_integration == "yes" && $pagination == "none") {
         $tweet_count = $instagram_count = floor($item_count / 4);
         $item_count = $item_count - $tweet_count - $instagram_count;
         if ($instagram_id == "") {
             $tweet_count = $tweet_count * 2;
         } else {
             if ($twitter_username == "") {
                 $instagram_count = $instagram_count * 2;
             }
         }
         if ($insta_item_count != "") {
             $instagram_count = $insta_item_count;
         }
         if ($tweet_item_count != "") {
             $tweet_count = $tweet_item_count;
         }
         /* TWEETS
            ================================================== */
         if ($twitter_username != "") {
             if ($fullwidth == "yes") {
                 $blog_items_output .= '<ul class="blog-tweets">' . sf_get_tweets($twitter_username, $tweet_count, 'blog-fw', $item_class) . '</ul>';
             } else {
                 $blog_items_output .= '<ul class="blog-tweets">' . sf_get_tweets($twitter_username, $tweet_count, 'blog', $item_class) . '</ul>';
             }
         }
         /* INSTAGRAMS
            ================================================== */
         if ($instagram_id != "" && $instagram_token != "") {
             $blog_items_output .= '<ul class="blog-instagrams" data-title="' . __("Instagram", "swiftframework") . '" data-count="' . $instagram_count . '" data-userid="' . $instagram_id . '" data-token="' . $instagram_token . '" data-itemclass="' . $item_class . '"></ul>';
         }
     }
     /* PAGINATION OUTPUT
        ================================================== */
     if ($pagination == "infinite-scroll") {
         global $sf_include_infscroll;
         $sf_include_infscroll = true;
         $blog_items_output .= '<div class="pagination-wrap hidden">';
         $blog_items_output .= pagenavi($blog_items);
         $blog_items_output .= '</div>';
     } else {
         if ($pagination == "load-more") {
             global $sf_include_infscroll;
             $sf_include_infscroll = true;
             $blog_items_output .= '<a href="#" class="load-more-btn">' . __('Load More', 'swiftframework') . '</a>';
             $blog_items_output .= '<div class="pagination-wrap load-more hidden">';
             $blog_items_output .= pagenavi($blog_items);
             $blog_items_output .= '</div>';
         } else {
             if ($pagination == "standard") {
                 if ($blog_type == "masonry") {
                     $blog_items_output .= '<div class="pagination-wrap masonry-pagination">';
                 } else {
                     $blog_items_output .= '<div class="pagination-wrap">';
                 }
                 $blog_items_output .= pagenavi($blog_items);
                 $blog_items_output .= '</div>';
             }
         }
     }
     $blog_items_output .= '</div>';
     /* FUNCTION OUTPUT
        ================================================== */
     return $blog_items_output;
 }
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $tax_terms = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'portfolio_type' => 'basic', 'display_type' => 'standard', 'columns' => '4', 'show_title' => 'yes', 'show_client' => 'yes', 'show_excerpt' => 'yes', "excerpt_length" => '20', 'item_count' => '-1', 'category' => '', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // PORTFOLIO QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $portfolio_args = array('post_type' => 'portfolio', 'post_status' => 'publish', 'paged' => $paged, 'portfolio-category' => $category_slug, 'posts_per_page' => $item_count);
     $portfolio_items = new WP_Query($portfolio_args);
     $count = 0;
     // LIST CLASS SETUP BASED ON SELECTED OPTIONS
     $list_class = '';
     if ($display_type == "bordered" || $display_type == "bordered_gallery") {
         $list_class .= 'bordered-items ';
     }
     if ($portfolio_type == "masonry") {
         $list_class .= 'masonry-items';
     }
     $items .= '<ul class="portfolio-items filterable-items ' . $list_class . ' clearfix">';
     // PORTFOLIO LOOP
     while ($portfolio_items->have_posts()) {
         $portfolio_items->the_post();
         // META VARIABLES
         $thumb_image = $video = $item_class = $link_config = '';
         $thumb_width = 420;
         $thumb_height = 315;
         $video_height = 315;
         $bordered_thumb_width = 408;
         $bordered_thumb_height = 303;
         $bordered_video_height = 303;
         if ($portfolio_type == "masonry") {
             $thumb_height = NULL;
             $video_height = 315;
             $bordered_thumb_height = NULL;
         }
         $thumb_type = get_post_meta($post->ID, 'sf_thumbnail_type', true);
         $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
         $thumb_video = get_post_meta($post->ID, 'sf_thumbnail_video_url', true);
         $thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image');
         $thumb_link_type = get_post_meta($post->ID, 'sf_thumbnail_link_type', true);
         $thumb_link_url = get_post_meta($post->ID, 'sf_thumbnail_link_url', true);
         $thumb_lightbox_thumb = rwmb_meta('sf_thumbnail_image', 'type=image&size=large');
         $thumb_lightbox_image = rwmb_meta('sf_thumbnail_link_image', 'type=image&size=large');
         $thumb_lightbox_video_url = get_post_meta($post->ID, 'sf_thumbnail_link_video_url', true);
         foreach ($thumb_image as $detail_image) {
             $thumb_img_url = $detail_image['url'];
             break;
         }
         if (!$thumb_image) {
             $thumb_image = get_post_thumbnail_id();
             $thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
         }
         $item_title = get_the_title();
         $item_client = get_post_meta($post->ID, 'sf_portfolio_client', true);
         $permalink = get_permalink();
         $custom_excerpt = get_post_meta($post->ID, 'sf_custom_excerpt', true);
         $post_excerpt = '';
         if ($custom_excerpt != '') {
             $post_excerpt = custom_excerpt($custom_excerpt, $excerpt_length);
         } else {
             $post_excerpt = excerpt($excerpt_length);
         }
         $thumb_lightbox_img_url = wp_get_attachment_url($thumb_lightbox_image, 'full');
         $post_terms = get_the_terms($post->ID, 'portfolio-category');
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . strtolower(str_replace(' ', '-', $post_term->name)) . ' ';
             }
         }
         // COLUMN OPTION VARIABLES
         $item_class = $item_icon = "";
         if ($columns == "1") {
             $item_class = "one-col ";
             $excerpt = get_the_excerpt();
             $thumb_width = 940;
             $thumb_height = NULL;
             $video_height = 528;
             $bordered_thumb_width = 928;
             $bordered_thumb_height = NULL;
             $bordered_video_height = 522;
         } else {
             if ($columns == "2") {
                 $item_class = "eight ";
             } else {
                 if ($columns == "3") {
                     $item_class = "thirds ";
                 } else {
                     if ($columns == "4") {
                         $item_class = "four ";
                     }
                 }
             }
         }
         // DISPLAY TYPE VARIABLES
         if ($display_type == "standard") {
             $item_class .= "standard ";
         } else {
             if ($display_type == "bordered") {
                 $item_class .= "bordered ";
             } else {
                 if ($display_type == "gallery") {
                     $item_class .= "gallery ";
                 } else {
                     if ($display_type == "bordered_gallery") {
                         $item_class .= "gallery bordered ";
                     }
                 }
             }
         }
         if ($thumb_type == "image") {
             $item_class .= "image-item";
         }
         // LINK TYPE VARIABLES
         if ($thumb_link_type == "link_to_url") {
             $link_config = 'href="' . $thumb_link_url . '" class="link-to-url"';
             $item_icon = "link";
         } else {
             if ($thumb_link_type == "link_to_url_nw") {
                 $link_config = 'href="' . $thumb_link_url . '" class="link-to-url" target="_blank"';
                 $item_icon = "link";
             } else {
                 if ($thumb_link_type == "lightbox_thumb") {
                     $link_config = 'href="' . $thumb_img_url . '" class="view"';
                     $item_icon = "search";
                 } else {
                     if ($thumb_link_type == "lightbox_image") {
                         $lightbox_image_url = '';
                         foreach ($thumb_lightbox_image as $image) {
                             $lightbox_image_url = $image['full_url'];
                         }
                         $link_config = 'href="' . $lightbox_image_url . '" class="view"';
                         $item_icon = "search";
                     } else {
                         if ($thumb_link_type == "lightbox_video") {
                             $link_config = 'href="' . $thumb_lightbox_video_url . '" class="fancybox-media"';
                             $item_icon = "facetime-video";
                         } else {
                             $link_config = 'href="' . $permalink . '" class="link-to-post"';
                             $item_icon = "file";
                         }
                     }
                 }
             }
         }
         $items .= '<li data-id="id-' . $count . '" class="clearfix portfolio-item ' . $item_class . ' columns' . $term_slug . '">';
         $items .= '<figure>';
         // THUMBNAIL MEDIA TYPE SETUP
         if ($thumb_type == "video") {
             if ($display_type == "bordered" || $display_type == "bordered_gallery") {
                 $video = video_embed($thumb_video, $bordered_thumb_width, $bordered_video_height);
             } else {
                 $video = video_embed($thumb_video, $thumb_width, $video_height);
             }
             $items .= $video;
         } else {
             if ($thumb_type == "slider") {
                 $items .= '<div class="flexslider thumb-slider"><ul class="slides">';
                 foreach ($thumb_gallery as $image) {
                     $items .= "<li><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></li>";
                 }
                 $items .= '</ul><div class="open-item"><a ' . $link_config . '><i class="icon-plus"></i></a></div></div>';
             } else {
                 if ($display_type == "bordered" || $display_type == "bordered_gallery") {
                     $image = aq_resize($thumb_img_url, $bordered_thumb_width, $bordered_thumb_height, true, false);
                 } else {
                     $image = aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                 }
                 if ($image) {
                     $items .= '<a ' . $link_config . '>';
                     $items .= '<div class="overlay"><div class="thumb-info">';
                     if ($display_type == "gallery" || $display_type == "bordered_gallery") {
                         $items .= '<h4>' . $item_title . '</h4>';
                         $items .= '<i class="icon-' . $item_icon . ' small-icon"></i>';
                     } else {
                         $items .= '<i class="icon-' . $item_icon . '"></i>';
                     }
                     $items .= '</div></div>';
                     $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />';
                     $items .= '</a>';
                 }
             }
         }
         $items .= '</figure>';
         // ITEM INFO SETUP
         if ($display_type != "gallery" && $display_type != "bordered_gallery") {
             $items .= '<div class="portfolio-item-details">';
             if ($show_title == "yes") {
                 $items .= '<h4 class="portfolio-item-title"><a ' . $link_config . '>' . $item_title . '</a></h4>';
             }
             if ($show_client == "yes" && $item_client) {
                 $items .= '<span class="portfolio-client-title">' . $item_client . '</span>';
             }
             if ($show_excerpt == "yes") {
                 $items .= '<div class="portfolio-item-excerpt">' . $post_excerpt . '</div>';
             }
             $items .= '</div>';
         }
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($portfolio_items);
         $items .= '</div>';
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_portfolio_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper portfolio-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h2 class="wpb_heading">' . $title . '</h2></div>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $include_isotope;
     global $has_portfolio;
     $include_isotope = true;
     $has_portfolio = true;
     return $output;
 }
Example #9
0
 function sf_portfolio_items($display_type, $columns, $show_title, $show_subtitle, $show_excerpt, $hover_show_excerpt, $excerpt_length, $item_count, $category, $exclude_categories, $pagination, $sidebars)
 {
     /* OUTPUT VARIABLE
     			================================================== */
     $portfolio_items_output = "";
     $count = 0;
     /* CATEGORY SLUG MODIFICATION
        ================================================== */
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     /* PORTFOLIO QUERY SETUP
        ================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $portfolio_args = array('post_type' => 'portfolio', 'post_status' => 'publish', 'paged' => $paged, 'portfolio-category' => $category_slug, 'posts_per_page' => $item_count, 'tax_query' => array(array('taxonomy' => 'portfolio-category', 'field' => 'id', 'terms' => array($exclude_categories), 'operator' => 'NOT IN')));
     $portfolio_items = new WP_Query($portfolio_args);
     /* LIST CLASS CONFIG
     			================================================== */
     $list_class = '';
     if ($display_type == "masonry" || $display_type == "masonry-gallery") {
         $list_class .= 'masonry-items filterable-items col-' . $columns . ' row clearfix';
     } else {
         if ($display_type == "masonry-fw" || $display_type == "masonry-gallery-fw") {
             $list_class .= 'masonry-items masonry-fw filterable-items col-' . $columns . ' row clearfix';
         } else {
             if ($display_type == "gallery") {
                 $list_class .= 'gallery-portfolio filterable-items col-' . $columns . ' row clearfix';
             } else {
                 $list_class .= 'standard-portfolio filterable-items col-' . $columns . ' row clearfix';
             }
         }
     }
     /* ITEMS OUTPUT
     			================================================== */
     $options = get_option('sf_dante_options');
     $enable_portfolio_gallery = $options['enable_portfolio_gallery'];
     $portfolio_items_output .= '<ul class="portfolio-items ' . $list_class . '">' . "\n";
     while ($portfolio_items->have_posts()) {
         $portfolio_items->the_post();
         /* META VARIABLES
         			================================================== */
         $thumb_image = $thumb_gallery = $video = $item_class = $link_config = '';
         $thumb_width = 420;
         $thumb_height = 315;
         $video_height = 315;
         $thumb_type = get_post_meta($post->ID, 'sf_thumbnail_type', true);
         $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
         $thumb_video = get_post_meta($post->ID, 'sf_thumbnail_video_url', true);
         if ($columns == "2") {
             $thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image-twocol');
         } else {
             $thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image');
         }
         $thumb_link_type = get_post_meta($post->ID, 'sf_thumbnail_link_type', true);
         $thumb_link_url = get_post_meta($post->ID, 'sf_thumbnail_link_url', true);
         $thumb_lightbox_thumb = rwmb_meta('sf_thumbnail_image', 'type=image&size=large');
         $thumb_lightbox_image = rwmb_meta('sf_thumbnail_link_image', 'type=image&size=large');
         $thumb_lightbox_video_url = get_post_meta($post->ID, 'sf_thumbnail_link_video_url', true);
         $thumb_lightbox_video_url = sf_get_embed_src($thumb_lightbox_video_url);
         foreach ($thumb_image as $detail_image) {
             $thumb_img_url = $detail_image['url'];
             break;
         }
         if (!$thumb_image) {
             $thumb_image = get_post_thumbnail_id();
             $thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
         }
         $thumb_lightbox_img_url = wp_get_attachment_url($thumb_lightbox_image, 'full');
         $item_title = get_the_title();
         $item_subtitle = get_post_meta($post->ID, 'sf_portfolio_subtitle', true);
         $permalink = get_permalink();
         $custom_excerpt = get_post_meta($post->ID, 'sf_custom_excerpt', true);
         $post_excerpt = '';
         if ($custom_excerpt != '') {
             $post_excerpt = sf_custom_excerpt($custom_excerpt, $excerpt_length);
         } else {
             $post_excerpt = sf_excerpt($excerpt_length);
         }
         $post_terms = get_the_terms($post->ID, 'portfolio-category');
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . $post_term->slug . ' ';
             }
         }
         /* COLUMN VARIABLE CONFIG
         			================================================== */
         $item_class = $item_icon = "";
         if ($columns == "2") {
             if ($sidebars == "both-sidebars") {
                 $item_class = "col-sm-3 ";
             } else {
                 if ($sidebars == "one-sidebar") {
                     $item_class = "col-sm-4 ";
                 } else {
                     $item_class = "col-sm-6 ";
                     $thumb_width = 800;
                     $thumb_height = 600;
                     $video_height = 600;
                 }
             }
         } else {
             if ($columns == "3") {
                 if ($sidebars == "both-sidebars") {
                     $item_class = "col-sm-2 ";
                 } else {
                     if ($sidebars == "one-sidebar") {
                         $item_class = "span-third ";
                     } else {
                         $item_class = "col-sm-4 ";
                         $thumb_width = 600;
                         $thumb_height = 450;
                         $video_height = 450;
                     }
                 }
             } else {
                 if ($columns == "4") {
                     if ($sidebars == "both-sidebars") {
                         $item_class = "col-sm-3 ";
                     } else {
                         if ($sidebars == "one-sidebar") {
                             $item_class = "col-sm-2 ";
                         } else {
                             $item_class = "col-sm-3 ";
                         }
                     }
                 }
             }
         }
         if ($display_type == "masonry" || $display_type == "masonry-gallery" || $display_type == "masonry=fw" || $display_type == "masonry-gallery-fw") {
             $thumb_height = NULL;
         }
         /* DISPLAY TYPE CONFIG
         			================================================== */
         if ($display_type == "masonry" || $display_type == "masonry-gallery" || $display_type == "masonry-fw" || $display_type == "masonry-gallery-fw") {
             $item_class .= "masonry-item masonry-gallery-item";
         } else {
             if ($display_type == "gallery") {
                 $item_class .= "gallery-item ";
             } else {
                 $item_class .= "standard ";
             }
         }
         /* LINK TYPE CONFIG
         			================================================== */
         if ($thumb_link_type == "link_to_url") {
             $link_config = 'href="' . $thumb_link_url . '" class="link-to-url"';
             $item_icon = "ss-link";
         } else {
             if ($thumb_link_type == "link_to_url_nw") {
                 $link_config = 'href="' . $thumb_link_url . '" class="link-to-url" target="_blank"';
                 $item_icon = "ss-link";
             } else {
                 if ($thumb_link_type == "lightbox_thumb") {
                     if ($enable_portfolio_gallery) {
                         $link_config = 'href="' . $thumb_img_url . '" class="view" rel="item-gallery"';
                     } else {
                         $link_config = 'href="' . $thumb_img_url . '" class="view"';
                     }
                     $item_icon = "ss-view";
                 } else {
                     if ($thumb_link_type == "lightbox_image") {
                         $lightbox_image_url = '';
                         foreach ($thumb_lightbox_image as $image) {
                             $lightbox_image_url = $image['full_url'];
                         }
                         if ($enable_portfolio_gallery) {
                             $link_config = 'href="' . $lightbox_image_url . '" class="view" rel="item-gallery"';
                         } else {
                             $link_config = 'href="' . $lightbox_image_url . '" class="view"';
                         }
                         $item_icon = "ss-view";
                     } else {
                         if ($thumb_link_type == "lightbox_video") {
                             $link_config = 'data-video="' . $thumb_lightbox_video_url . '" href="#" class="fw-video-link"';
                             $item_icon = "ss-video";
                         } else {
                             $link_config = 'href="' . $permalink . '" class="link-to-post"';
                             $item_icon = "ss-navigateright";
                         }
                     }
                 }
             }
         }
         /* ITEM OUTPUT
         			================================================== */
         $portfolio_items_output .= '<li itemscope itemtype="http://schema.org/CreativeWork" data-id="id-' . $count . '" class="clearfix portfolio-item ' . $item_class . ' ' . $term_slug . '">' . "\n";
         /* THUMBNAIL CONFIG
         			================================================== */
         if ($thumb_type != "none") {
             if ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-fw" || $display_type == "masonry-gallery-fw") {
                 $portfolio_items_output .= '<figure class="animated-overlay">' . "\n";
             } else {
                 $portfolio_items_output .= '<figure class="animated-overlay overlay-alt">' . "\n";
             }
             if ($thumb_type == "video") {
                 $video = sf_video_embed($thumb_video, $thumb_width, $video_height);
                 $portfolio_items_output .= $video;
             } else {
                 if ($thumb_type == "slider") {
                     $portfolio_items_output .= '<div class="flexslider thumb-slider"><ul class="slides">' . "\n";
                     foreach ($thumb_gallery as $image) {
                         $portfolio_items_output .= "<li><a " . $link_config . "><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a></li>" . "\n";
                     }
                     $portfolio_items_output .= '</ul></div>' . "\n";
                 } else {
                     if ($thumb_type == "image" && $thumb_img_url == "") {
                         $thumb_img_url = "default";
                     }
                     $image = sf_aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                     if ($image) {
                         $portfolio_items_output .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />' . "\n";
                         $portfolio_items_output .= '<a ' . $link_config . '></a>';
                         if ($item_subtitle != "" && $hover_show_excerpt == "no" && ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-gallery-fw")) {
                             $portfolio_items_output .= '<figcaption><div class="thumb-info thumb-info-extended">';
                         } else {
                             if ($display_type == "standard" || $display_type == "masonry" || $display_type == "masonry-fw") {
                                 $portfolio_items_output .= '<figcaption><div class="thumb-info thumb-info-alt">';
                             } else {
                                 if ($hover_show_excerpt == "yes" && ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-gallery-fw")) {
                                     $portfolio_items_output .= '<figcaption><div class="thumb-info thumb-info-excerpt">';
                                 } else {
                                     $portfolio_items_output .= '<figcaption><div class="thumb-info">';
                                 }
                             }
                         }
                         if ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-gallery-fw") {
                             if ($hover_show_excerpt == "yes") {
                                 $portfolio_items_output .= '<h4 itemprop="name headline">' . $item_title . '</h4>';
                                 $portfolio_items_output .= '<div itemprop="description">' . $post_excerpt . '</div>';
                             } else {
                                 $portfolio_items_output .= '<h4 itemprop="name headline">' . $item_title . '</h4>';
                                 $portfolio_items_output .= '<h5 itemprop="name alternative">' . $item_subtitle . '</h5>';
                             }
                         }
                         $portfolio_items_output .= '<i class="' . $item_icon . '"></i>';
                         $portfolio_items_output .= '</div></figcaption>';
                     }
                 }
             }
             $portfolio_items_output .= '</figure>' . "\n";
         }
         if ($display_type != "gallery" && $display_type != "masonry-gallery" && $display_type != "masonry-gallery-fw") {
             $portfolio_items_output .= '<div class="portfolio-item-details">' . "\n";
             $portfolio_items_output .= '<div class="comments-likes">';
             if (function_exists('lip_love_it_link')) {
                 $portfolio_items_output .= lip_love_it_link(get_the_ID(), '<i class="ss-heart"></i>', '<i class="ss-heart"></i>', false);
             }
             $portfolio_items_output .= '</div>';
             if ($show_title == "yes") {
                 if ($enable_portfolio_gallery) {
                     $portfolio_items_output .= '<h3 class="portfolio-item-title" itemprop="name headline"><a href="' . $permalink . '" class="link-to-post">' . $item_title . '</a></h3>' . "\n";
                 } else {
                     $portfolio_items_output .= '<h3 class="portfolio-item-title" itemprop="name headline"><a ' . $link_config . '>' . $item_title . '</a></h3>' . "\n";
                 }
             }
             if ($show_subtitle == "yes" && $item_subtitle) {
                 $portfolio_items_output .= '<h5 class="portfolio-subtitle" itemprop="alternativeHeadline">' . $item_subtitle . '</h5>' . "\n";
             }
             if ($show_excerpt == "yes") {
                 $portfolio_items_output .= '<div class="portfolio-item-excerpt" itemprop="description">' . $post_excerpt . '</div>' . "\n";
             }
             $portfolio_items_output .= '</div>' . "\n";
         }
         $portfolio_items_output .= '</li>' . "\n";
         $count++;
     }
     wp_reset_postdata();
     $portfolio_items_output .= '</ul>' . "\n";
     /* PAGINATION OUTPUT
     			================================================== */
     if ($pagination == "yes") {
         if ($display_type == "masonry" || $display_type == "masonry-gallery" || $display_type == "masonry-fw" || $display_type == "masonry-gallery-fw") {
             $portfolio_items_output .= '<div class="pagination-wrap masonry-pagination">';
         } else {
             $portfolio_items_output .= '<div class="pagination-wrap">';
         }
         $portfolio_items_output .= pagenavi($portfolio_items);
         $portfolio_items_output .= '</div>';
     }
     /* FUNCTION OUTPUT
     			================================================== */
     return $portfolio_items_output;
 }
Example #10
0
 function sf_blog_items($blog_type, $masonry_effect_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more, $item_count, $category, $exclude_categories, $pagination, $sidebar_config, $width, $offset, $posts_order)
 {
     $blog_items_output = "";
     $options = get_option('sf_dante_options');
     $filter_wrap_bg = $options['filter_wrap_bg'];
     global $sf_sidebar_config;
     $sf_sidebar_config = $sidebar_config;
     /* CATEGORY SLUG MODIFICATION
     			================================================== */
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     /* BLOG QUERY SETUP
     			================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
         $offset = $offset + $item_count * ($paged - 1);
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
         $offset = $offset + $item_count * ($paged - 1);
     } else {
         $paged = 1;
     }
     $blog_args = array();
     $category_array = explode(",", $category_slug);
     if (isset($category_array) && $category_array[0] != "") {
         $blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $posts_order, 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $category_array)));
     } else {
         $blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $posts_order);
     }
     $blog_items = new WP_Query($blog_args);
     /* LIST CLASS CONFIG
     			================================================== */
     $list_class = $wrap_class = '';
     if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
         $list_class .= 'masonry-items first-load grid ' . $masonry_effect_type;
     } else {
         if ($blog_type == "mini") {
             $list_class .= 'mini-items';
         } else {
             $list_class .= 'standard-items';
             if ($sidebar_config == "no-sidebars") {
                 $wrap_class .= 'col-sm-8 col-sm-offset-2';
             }
         }
     }
     /* BLOG ITEMS OUTPUT
     			================================================== */
     $blog_items_output .= '<div class="blog-items-wrap blog-' . $blog_type . ' ' . $wrap_class . '">';
     if ($blog_type == "standard") {
         $blog_items_output .= '<div class="timeline"></div>';
     }
     if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
         $blog_items_output .= '<ul class="blog-items row ' . $list_class . ' clearfix" id="blogGrid">';
     } else {
         $blog_items_output .= '<ul class="blog-items row ' . $list_class . ' clearfix">';
     }
     while ($blog_items->have_posts()) {
         $blog_items->the_post();
         $post_format = get_post_format($post->ID);
         if ($post_format == "") {
             $post_format = 'standard';
         }
         if ($blog_type == "mini") {
             $item_class = "col-sm-12";
         } else {
             if ($blog_type == "masonry") {
                 if ($sidebar_config == "both-sidebars") {
                     $item_class = "col-sm-3";
                 } else {
                     $item_class = "col-sm-4";
                 }
             } else {
                 if ($blog_type == "masonry-fw") {
                     $item_class = "col-sm-3";
                 } else {
                     $item_class = $width;
                 }
             }
         }
         /* BLOG ITEM OUTPUT
         			================================================== */
         $blog_items_output .= '<li itemscope itemtype="http://schema.org/BlogPosting" class="blog-item ' . $item_class . ' ' . implode(' ', get_post_class()) . '" id="' . get_the_ID() . '">';
         $blog_items_output .= sf_get_post_item($post->ID, $blog_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more);
         $blog_items_output .= '</li>';
     }
     wp_reset_postdata();
     $blog_items_output .= '</ul>';
     /* PAGINATION OUTPUT
     			================================================== */
     if ($pagination == "infinite-scroll") {
         global $sf_include_infscroll;
         $sf_include_infscroll = true;
         $blog_items_output .= '<div class="pagination-wrap inf-scroll-pagination hidden">';
         $blog_items_output .= pagenavi($blog_items);
         $blog_items_output .= '</div>';
     } else {
         if ($pagination == "load-more") {
             global $sf_include_infscroll;
             $sf_include_infscroll = true;
             $blog_items_output .= '<a href="#" class="load-more-btn">' . __('Load More', 'swiftframework') . '</a>';
             $blog_items_output .= '<div class="pagination-wrap load-more hidden">';
             $blog_items_output .= pagenavi($blog_items);
             $blog_items_output .= '</div>';
         } else {
             if ($pagination == "standard") {
                 if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
                     $blog_items_output .= '<div class="pagination-wrap masonry-pagination">';
                 } else {
                     $blog_items_output .= '<div class="pagination-wrap">';
                 }
                 $blog_items_output .= pagenavi($blog_items);
                 $blog_items_output .= '</div>';
             }
         }
     }
     $blog_items_output .= '</div>';
     /* FUNCTION OUTPUT
     			================================================== */
     return $blog_items_output;
 }
Example #11
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $carousel = $item_class = $output = $tax_terms = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'item_columns' => '4', 'category' => '', 'carousel' => 'no', 'carousel_columns' => '', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // CLIENTS QUERY SETUP
     global $post, $wp_query, $sf_carouselID;
     if ($sf_carouselID == "") {
         $sf_carouselID = 1;
     } else {
         $sf_carouselID++;
     }
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $client_args = array('post_type' => 'clients', 'post_status' => 'publish', 'paged' => $paged, 'clients-category' => $category_slug, 'posts_per_page' => $item_count);
     $clients_items = new WP_Query($client_args);
     global $column_width;
     $client_width = 300;
     $client_height = 300;
     if ($item_columns == "5") {
         $item_class = 'col-sm-sf-5';
     } else {
         if ($item_columns == "4") {
             $item_class = 'col-sm-3';
         } else {
             if ($item_columns == "3") {
                 $item_class = 'col-sm-4';
                 $client_width = 400;
                 $client_height = 400;
             }
         }
     }
     if ($item_columns == "2") {
         $item_class = 'col-sm-6';
         $client_width = 600;
         $client_height = 600;
     }
     if ($carousel == "yes") {
         $items .= '<div id="carousel-' . $sf_carouselID . '" class="clients-items carousel-items clearfix" data-columns="' . $item_columns . '">';
     } else {
         $items .= '<div class="clients-items row clearfix">';
     }
     // CLIENTS LOOP
     while ($clients_items->have_posts()) {
         $clients_items->the_post();
         $client_image = get_post_thumbnail_id();
         $client_img_url = wp_get_attachment_url($client_image, 'full');
         $client_link_url = sf_get_post_meta($post->ID, 'sf_client_link', true);
         $image_alt = esc_attr(sf_get_post_meta($client_image, '_wp_attachment_image_alt', true));
         if ($carousel == "yes") {
             $items .= '<div class="clearfix carousel-item">';
         } else {
             $items .= '<div class="' . $item_class . ' client-item clearfix">';
         }
         $items .= '<figure>';
         $image = sf_aq_resize($client_img_url, $client_width, $client_height, true, false);
         if ($image) {
             if ($client_link_url) {
                 $items .= '<a href="' . $client_link_url . '" target="_blank"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" /></a>';
             } else {
                 $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" />';
             }
         }
         $items .= '</figure>';
         $items .= '</div>';
     }
     wp_reset_query();
     wp_reset_postdata();
     $items .= '</div>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($clients_items);
         $items .= '</div>';
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="spb_clients_widget clients-wrap carousel-asset spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb-asset-content">';
     $output .= "\n\t\t" . '<div class="title-wrap clearfix">';
     if ($title != '') {
         $output .= '<h3 class="spb-heading"><span>' . $title . '</span></h3>';
     }
     if ($carousel == "yes") {
         $output .= spb_carousel_arrows();
     }
     $output .= '</div>';
     $output .= "\n\t\t" . $items;
     $output .= "\n\t\t" . '</div>';
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $sf_include_carousel;
     $sf_include_carousel = true;
     return $output;
 }
Example #12
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $items = $item_figure = $el_position = '';
     extract(shortcode_atts(array('title' => '', "pagination" => "no", "blog_type" => "standard", "excerpt_length" => '20', "item_count" => '5', "category" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // BLOG QUERY SETUP
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'category_name' => $category_slug, 'posts_per_page' => $item_count);
     $blog_items = new WP_Query($blog_args);
     $list_class = '';
     if ($blog_type == "masonry") {
         $list_class .= 'masonry-items';
     } else {
         if ($blog_type == "mini") {
             $list_class .= 'mini-items';
         } else {
             $list_class .= 'standard-items';
         }
     }
     $items .= '<ul class="blog-items ' . $list_class . ' clearfix">';
     while ($blog_items->have_posts()) {
         $blog_items->the_post();
         $post_format = get_post_format();
         $post_title = get_the_title();
         $post_author = get_the_author_link();
         $post_date = get_the_date();
         $post_categories = get_the_category_list(', ');
         $post_comments = get_comments_number();
         $post_permalink = get_permalink();
         $custom_excerpt = get_post_meta($post->ID, 'coope_custom_excerpt', true);
         $post_excerpt = '';
         if ($custom_excerpt != '') {
             $post_excerpt = custom_excerpt($custom_excerpt, $excerpt_length);
         } else {
             $post_excerpt = excerpt($excerpt_length);
         }
         $sidebar_config = get_post_meta($post->ID, 'coope_sidebar_config', true);
         $thumb_image = $thumb_width = $thumb_height = $bordered_thumb_width = $bordered_thumb_height = $video = $video_height = $bordered_video_height = $item_class = $link_config = $item_icon = '';
         if ($blog_type == "mini") {
             if ($sidebar_config == "no-sidebars") {
                 $thumb_width = 446;
                 $thumb_height = NULL;
                 $video_height = 250;
             } else {
                 $thumb_width = 290;
                 $thumb_height = NULL;
                 $video_height = 163;
             }
         } else {
             $thumb_width = 640;
             $thumb_height = NULL;
             $video_height = 360;
             $bordered_thumb_width = 408;
             $bordered_thumb_height = 303;
             $bordered_video_height = 303;
         }
         $thumb_type = get_post_meta($post->ID, 'coope_thumbnail_type', true);
         $thumb_image = rwmb_meta('coope_thumbnail_image', 'type=image&size=full');
         $thumb_video = get_post_meta($post->ID, 'coope_thumbnail_video_url', true);
         $thumb_gallery = rwmb_meta('coope_thumbnail_gallery', 'type=image&size=blog-image');
         $thumb_link_type = get_post_meta($post->ID, 'coope_thumbnail_link_type', true);
         $thumb_link_url = get_post_meta($post->ID, 'coope_thumbnail_link_url', true);
         $thumb_lightbox_thumb = rwmb_meta('coope_thumbnail_image', 'type=image&size=large');
         $thumb_lightbox_image = rwmb_meta('coope_thumbnail_link_image', 'type=image&size=large');
         $thumb_lightbox_video_url = get_post_meta($post->ID, 'coope_thumbnail_link_video_url', true);
         foreach ($thumb_image as $detail_image) {
             $thumb_img_url = $detail_image['url'];
             break;
         }
         if (!$thumb_image) {
             $thumb_image = get_post_thumbnail_id();
             $thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
         }
         $thumb_lightbox_img_url = wp_get_attachment_url($thumb_lightbox_image, 'full');
         // LINK TYPE VARIABLES
         if ($thumb_link_type == "link_to_url") {
             $link_config = 'href="' . $thumb_link_url . '" class="link-to-url"';
             $item_icon = "link";
         } else {
             if ($thumb_link_type == "link_to_url_nw") {
                 $link_config = 'href="' . $thumb_link_url . '" class="link-to-url" target="_blank"';
                 $item_icon = "link";
             } else {
                 if ($thumb_link_type == "lightbox_thumb") {
                     $link_config = 'href="' . $thumb_img_url . '" class="view"';
                     $item_icon = "search";
                 } else {
                     if ($thumb_link_type == "lightbox_image") {
                         $lightbox_image_url = '';
                         foreach ($thumb_lightbox_image as $image) {
                             $lightbox_image_url = $image['full_url'];
                         }
                         $link_config = 'href="' . $lightbox_image_url . '" class="view"';
                         $item_icon = "search";
                     } else {
                         if ($thumb_link_type == "lightbox_video") {
                             $link_config = 'href="' . $thumb_lightbox_video_url . '" class="fancybox-media"';
                             $item_icon = "facetime-video";
                         } else {
                             $link_config = 'href="' . $post_permalink . '" class="link-to-post"';
                             $item_icon = "file";
                         }
                     }
                 }
             }
         }
         // THUMBNAIL MEDIA TYPE SETUP
         if ($thumb_type == "none") {
             $item_figure .= '<div class="spacer"></div>';
         } else {
             $item_figure .= '<figure>';
             if ($thumb_type == "video") {
                 $video = video_embed($thumb_video, $thumb_width, $video_height);
                 $item_figure .= $video;
             } else {
                 if ($thumb_type == "slider") {
                     $item_figure .= '<div class="flexslider thumb-slider"><ul class="slides">';
                     foreach ($thumb_gallery as $image) {
                         $item_figure .= "<li><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></li>";
                     }
                     $item_figure .= '</ul><div class="open-item"><a ' . $link_config . '><i class="icon-plus"></i></a></div></div>';
                 } else {
                     if ($thumb_type == "image") {
                         $image = aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                         if ($image) {
                             $item_figure .= '<a ' . $link_config . '>';
                             if ($blog_type == "masonry") {
                                 $item_figure .= '<div class="overlay"><div class="thumb-info">';
                                 $item_figure .= '<i class="icon-' . $item_icon . '"></i>';
                                 $item_figure .= '</div></div>';
                             }
                             $item_figure .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
                             $item_figure .= '</a>';
                         }
                     }
                 }
             }
             $item_figure .= '</figure>';
         }
         // BLOG ITEM OUTPUT
         $items .= '<li class="blog-item">';
         if ($blog_type == "masonry") {
             $items .= $item_figure;
             $item_figure = '';
             $items .= '<div class="blog-details-wrap">';
             $items .= '<h4><a href="' . $post_permalink . '">' . $post_title . '</a></h4>';
             $items .= '<div class="blog-item-details clearfix">' . sprintf(__('By <a href="%2$s">%1$s</a> on %3$s in %4$s', 'coope'), $post_author, get_author_posts_url(get_the_author_meta('ID')), $post_date, $post_categories) . '</div>';
             $items .= $item_figure;
             if ($post_format == "quote") {
                 $items .= '<div class="quote-excerpt heading-font">' . get_the_content() . '</div>';
             } else {
                 $items .= '<div class="excerpt">' . $post_excerpt . '</div>';
             }
             $items .= '<div class="read-more-bar"><a class="read-more" href="' . $post_permalink . '">' . __("Keep Reading", "coope") . '<i class="icon-chevron-right"></i></a>';
             $items .= '<div class="comments-likes">';
             if (comments_open()) {
                 $items .= '<a href="' . $post_permalink . '#comment-area"><i class="icon-comments"></i><span>' . $post_comments . '</span></a> ';
             }
             if (function_exists('lip_love_it_link')) {
                 $items .= lip_love_it_link(get_the_ID(), '<i class="icon-heart"></i>', '<i class="icon-heart"></i>', false);
             }
             $items .= '</div></div>';
         } else {
             $items .= '<div class="blog-details-wrap">';
             $items .= '<h2><a href="' . $post_permalink . '">' . $post_title . '</a></h2>';
             $items .= '<div class="blog-item-details clearfix">' . sprintf(__('By <a href="%2$s">%1$s</a> on %3$s in %4$s', 'coope'), $post_author, get_author_posts_url(get_the_author_meta('ID')), $post_date, $post_categories);
             $items .= '<div class="comments-likes">';
             if (comments_open()) {
                 $items .= '<a href="' . $post_permalink . '#comment-area"><i class="icon-comments"></i><span>' . $post_comments . '</span></a> ';
             }
             if (function_exists('lip_love_it_link')) {
                 $items .= lip_love_it_link(get_the_ID(), '<i class="icon-heart"></i>', '<i class="icon-heart"></i>', false);
             }
             $items .= '</div></div>';
             $items .= $item_figure;
             if ($post_format == "quote") {
                 $items .= '<div class="quote-excerpt heading-font">' . get_the_content() . '</div>';
             } else {
                 $items .= '<div class="excerpt">' . $post_excerpt . '</div>';
             }
             $items .= '<a class="read-more" href="' . $post_permalink . '">' . __("Keep Reading", "coope") . '<i class="icon-chevron-right"></i></a>';
         }
         $items .= '</div></li>';
         $item_figure = '';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($blog_items);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_blog_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper blog-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     if ($blog_type == "masonry") {
         global $include_isotope;
         $include_isotope = true;
     }
     global $has_blog;
     $has_blog = true;
     return $output;
 }
 function sf_galleries($display_type, $link_type, $fullwidth, $gutters, $columns, $show_title, $show_subtitle, $show_excerpt, $excerpt_length, $item_count, $category, $pagination, $sidebars, $hover_style)
 {
     /* OUTPUT VARIABLE
        ================================================== */
     $gallery_items_output = "";
     $count = 0;
     /* CATEGORY SLUG MODIFICATION
        ================================================== */
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     /* GALLERIES QUERY SETUP
        ================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $galleries_args = array('post_type' => 'galleries', 'post_status' => 'publish', 'paged' => $paged, 'gallery-category' => $category_slug, 'posts_per_page' => $item_count);
     $galleries_items = new WP_Query($galleries_args);
     /* LIST CLASS CONFIG
        ================================================== */
     $list_class = '';
     if ($display_type == "masonry" || $display_type == "masonry-gallery") {
         $list_class .= 'masonry-items filterable-items col-' . $columns . ' row clearfix';
     } else {
         if ($display_type == "gallery") {
             $list_class .= 'gallery-galleries filterable-items col-' . $columns . ' row clearfix';
         } else {
             $list_class .= 'standard-galleries filterable-items col-' . $columns . ' row clearfix';
         }
     }
     // Full width
     if ($fullwidth == "yes") {
         $list_class .= ' galleries-full-width';
     }
     // Gutters
     if ($gutters == "no") {
         $list_class .= ' no-gutters';
     } else {
         $list_class .= ' gutters';
     }
     // Thumb Type
     if ($hover_style == "default" && function_exists('sf_get_thumb_type')) {
         $list_class .= ' ' . sf_get_thumb_type();
     } else {
         $list_class .= ' thumbnail-' . $hover_style;
     }
     /* ITEMS OUTPUT
        ================================================== */
     global $sf_options;
     $gallery_items_output .= '<ul class="gallery-items ' . $list_class . '">' . "\n";
     while ($galleries_items->have_posts()) {
         $galleries_items->the_post();
         /* META VARIABLES
            ================================================== */
         $thumb_type = sf_get_post_meta($post->ID, 'sf_thumbnail_type', true);
         $item_title = get_the_title();
         $item_subtitle = sf_get_post_meta($post->ID, 'sf_gallery_subtitle', true);
         $permalink = get_permalink();
         $custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
         $post_excerpt = '';
         if ($custom_excerpt != '') {
             $post_excerpt = sf_custom_excerpt($custom_excerpt, $excerpt_length);
         } else {
             $post_excerpt = sf_excerpt($excerpt_length);
         }
         $post_terms = get_the_terms($post->ID, 'gallery-category');
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . $post_term->slug . ' ';
             }
         }
         /* COLUMN VARIABLE CONFIG
            ================================================== */
         $item_class = "";
         if ($columns == "1") {
             $item_class = "col-sm-12 ";
         } else {
             if ($columns == "2") {
                 $item_class = "col-sm-6 ";
             } else {
                 if ($columns == "3") {
                     $item_class = "col-sm-4 ";
                 } else {
                     if ($columns == "4") {
                         $item_class = "col-sm-3 ";
                     } else {
                         if ($columns == "5") {
                             $item_class = "col-sm-sf-5 ";
                         }
                     }
                 }
             }
         }
         /* DISPLAY TYPE CONFIG
            ================================================== */
         if ($display_type == "masonry" || $display_type == "masonry-gallery") {
             $item_class .= "masonry-item masonry-gallery-item";
         } else {
             if ($display_type == "gallery") {
                 $item_class .= "gallery-item ";
             } else {
                 $item_class .= "standard ";
             }
         }
         /* LINK TYPE CONFIG
            ================================================== */
         $gallery_id = rand(0, 10000);
         $item_link = sf_gallery_item_link($link_type, $gallery_id);
         /* ITEM OUTPUT
            ================================================== */
         $gallery_items_output .= '<li itemscope itemtype="http://schema.org/CreativeWork" data-id="id-' . $count . '" class="clearfix gallery-item ' . $item_class . ' ' . $term_slug . '">' . "\n";
         /* THUMBNAIL CONFIG
            ================================================== */
         if ($thumb_type != "none") {
             $gallery_items_output .= sf_gallery_thumbnail($display_type, $link_type, $columns, $gutters, $count, $gallery_id);
         }
         if ($display_type != "gallery" && $display_type != "masonry-gallery") {
             $gallery_items_output .= '<div class="gallery-item-details">' . "\n";
             if ($show_title == "yes") {
                 $gallery_items_output .= '<div class="comments-likes">';
                 if (function_exists('lip_love_it_link')) {
                     $gallery_items_output .= lip_love_it_link(get_the_ID(), false);
                 }
                 $gallery_items_output .= '</div>';
                 $gallery_items_output .= '<h3 class="gallery-item-title" itemprop="name headline"><a href="' . get_permalink() . '">' . $item_title . '</a></h3>' . "\n";
             }
             if ($show_subtitle == "yes" && $item_subtitle) {
                 $gallery_items_output .= '<h5 class="gallery-subtitle" itemprop="name alternativeHeadline">' . $item_subtitle . '</h5>' . "\n";
             }
             if ($show_excerpt == "yes") {
                 $gallery_items_output .= '<div class="gallery-item-excerpt" itemprop="description">' . $post_excerpt . '</div>' . "\n";
             }
             $gallery_items_output .= '</div>' . "\n";
         }
         if ($item_link["script"] != "") {
             $gallery_items_output .= $item_link["script"];
         }
         $gallery_items_output .= '</li>' . "\n";
         $count++;
     }
     wp_reset_query();
     wp_reset_postdata();
     $gallery_items_output .= '</ul>' . "\n";
     /* PAGINATION OUTPUT
        ================================================== */
     if ($pagination == "yes") {
         if ($display_type == "masonry" || $display_type == "masonry-gallery") {
             $gallery_items_output .= '<div class="pagination-wrap masonry-pagination">';
         } else {
             $gallery_items_output .= '<div class="pagination-wrap">';
         }
         $gallery_items_output .= pagenavi($galleries_items);
         $gallery_items_output .= '</div>';
     }
     /* FUNCTION OUTPUT
        ================================================== */
     return $gallery_items_output;
 }
Example #14
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $filter = $social_icon_type = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', "item_count" => '12', "category" => '', 'social_icon_type' => 'dark', 'pagination' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $team_args = array('post_type' => 'team', 'post_status' => 'publish', 'paged' => $paged, 'team-category' => $category_slug, 'posts_per_page' => $item_count, 'ignore_sticky_posts' => 1);
     $team_members = new WP_Query($team_args);
     $count = 0;
     $sidebar_config = get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
     if (is_singular('portfolio')) {
         $sidebar_config = "no-sidebars";
     }
     if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
         $item_class = 'span2';
     } else {
         if ($sidebar_config == "both-sidebars") {
             $item_class = 'span-bs-quarter';
         } else {
             $item_class = 'span3';
         }
     }
     $items .= '<ul class="team-members row clearfix">';
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $member_name = get_the_title();
         $member_position = get_post_meta($post->ID, 'sf_team_member_position', true);
         $member_bio = get_the_content_with_formatting();
         $member_email = get_post_meta($post->ID, 'sf_team_member_email', true);
         $member_phone = get_post_meta($post->ID, 'sf_team_member_phone_number', true);
         $member_twitter = get_post_meta($post->ID, 'sf_team_member_twitter', true);
         $member_facebook = get_post_meta($post->ID, 'sf_team_member_facebook', true);
         $member_linkedin = get_post_meta($post->ID, 'sf_team_member_linkedin', true);
         $member_google_plus = get_post_meta($post->ID, 'sf_team_member_google_plus', true);
         $member_skype = get_post_meta($post->ID, 'sf_team_member_skype', true);
         $member_instagram = get_post_meta($post->ID, 'sf_team_member_instagram', true);
         $member_dribbble = get_post_meta($post->ID, 'sf_team_member_dribbble', true);
         $member_image = get_post_thumbnail_id();
         $items .= '<li data-id="id-' . $count . '" class="clearfix team-member ' . $item_class . '">';
         $img_url = wp_get_attachment_url($member_image, 'full');
         $image = aq_resize($img_url, 270, 270, true, false);
         $items .= '<figure>';
         if ($image) {
             $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
         }
         $items .= '</figure>';
         $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
         $items .= '<h4 class="team-member-position">' . $member_position . '</h4>';
         $items .= '<div class="team-member-details-wrap">';
         $items .= '<div class="team-member-bio">' . do_shortcode($member_bio) . '</div>';
         if ($member_email || $member_phone) {
             $items .= '<ul class="member-contact">';
             if ($member_email) {
                 $items .= '<li><span>E:</span> <a href="mailto:' . $member_email . '">' . $member_email . '</a></li>';
             }
             if ($member_phone) {
                 $items .= '<li><span>P:</span>' . $member_phone . '</li>';
             }
             $items .= '</ul>';
         }
         if ($member_twitter || $member_facebook || $member_linkedin || $member_google_plus || $member_skype || $member_instagram || $member_dribbble) {
             $items .= '<ul class="social-icons ' . $social_icon_type . ' small">';
             if ($member_twitter) {
                 $items .= '<li class="twitter"><a href="http://www.twitter.com/' . $member_twitter . '" target="_blank">Twitter</a></li>';
             }
             if ($member_facebook) {
                 $items .= '<li class="facebook"><a href="' . $member_facebook . '" target="_blank">Facebook</a></li>';
             }
             if ($member_linkedin) {
                 $items .= '<li class="linkedin"><a href="' . $member_linkedin . '" target="_blank">LinkedIn</a></li>';
             }
             if ($member_google_plus) {
                 $items .= '<li class="googleplus"><a href="' . $member_google_plus . '" target="_blank">Google+</a></li>';
             }
             if ($member_skype) {
                 $items .= '<li class="skype"><a href="skype:' . $member_skype . '" target="_blank">Skype</a></li>';
             }
             if ($member_instagram) {
                 $items .= '<li class="instagram"><a href="' . $member_instagram . '" target="_blank">Instagram</a></li>';
             }
             if ($member_dribbble) {
                 $items .= '<li class="dribbble"><a href="http://www.dribbble.com/' . $member_dribbble . '" target="_blank">Dribbble</a></li>';
             }
             $items .= '</ul>';
         }
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $include_isotope;
     global $has_team;
     $include_isotope = true;
     $has_team = true;
     return $output;
 }
Example #15
0
 function sf_portfolio_items($atts)
 {
     extract(shortcode_atts(array('title' => '', 'display_type' => '', 'multi_size_ratio' => '', 'fullwidth' => '', 'gutters' => '', 'columns' => '', 'show_title' => '', 'show_subtitle' => '', 'show_excerpt' => '', 'hover_show_excerpt' => '', 'excerpt_length' => '', 'item_count' => '', 'category' => '', 'order' => '', 'order_by' => '', 'portfolio_filter' => '', 'pagination' => '', 'button_enabled' => '', 'hover_style' => '', 'post_type' => 'portfolio', 'el_position' => '', 'width' => '', 'el_class' => ''), $atts));
     /* OUTPUT VARIABLE
        ================================================== */
     $portfolio_items_output = $grid_size = "";
     $count = 0;
     /* CATEGORY SLUG MODIFICATION
        ================================================== */
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     /* PORTFOLIO QUERY SETUP
        ================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $portfolio_args = array('post_type' => $post_type, 'post_status' => 'publish', 'paged' => $paged, 'portfolio-category' => $category_slug, 'posts_per_page' => $item_count, 'order' => $order, 'orderby' => $order_by);
     $portfolio_items = new WP_Query($portfolio_args);
     /* LIST CLASS CONFIG
        ================================================== */
     $list_class = '';
     if ($display_type == "masonry" || $display_type == "masonry-gallery") {
         $list_class .= 'masonry-items filterable-items col-' . $columns . ' row clearfix';
     } else {
         if ($display_type == "gallery") {
             $list_class .= 'gallery-portfolio filterable-items col-' . $columns . ' row clearfix';
         } else {
             if ($display_type == "multi-size-masonry") {
                 $columns = 3;
                 $list_class .= 'multi-masonry-items filterable-items col-' . $columns . ' row clearfix';
             } else {
                 $list_class .= 'standard-portfolio filterable-items col-' . $columns . ' row clearfix';
             }
         }
     }
     // Full width
     if ($fullwidth == "yes") {
         $list_class .= ' portfolio-full-width';
     }
     // Gutters
     if ($gutters == "no") {
         $list_class .= ' no-gutters';
     } else {
         $list_class .= ' gutters';
     }
     // Thumb Type
     if ($hover_style == "default" && function_exists('sf_get_thumb_type')) {
         $list_class .= ' ' . sf_get_thumb_type();
     } else {
         $list_class .= ' thumbnail-' . $hover_style;
     }
     if ($display_type == "multi-size-masonry") {
         if ($fullwidth == "yes") {
             $grid_size = 'col-sm-3';
         } else {
             $grid_size = 'col-sm-4';
         }
     }
     /* ITEMS OUTPUT
        ================================================== */
     global $sf_options;
     $portfolio_items_output .= '<ul class="portfolio-items ' . $list_class . '">' . "\n";
     if ($display_type == "multi-size-masonry") {
         $portfolio_items_output .= '<li class="clearfix portfolio-item ' . $grid_size . ' grid-sizer">' . "\n";
     }
     while ($portfolio_items->have_posts()) {
         $portfolio_items->the_post();
         /* META VARIABLES
            ================================================== */
         $thumb_type = sf_get_post_meta($post->ID, 'sf_thumbnail_type', true);
         $item_title = get_the_title();
         $item_subtitle = sf_get_post_meta($post->ID, 'sf_portfolio_subtitle', true);
         $permalink = get_permalink();
         $custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
         $post_excerpt = '';
         if ($custom_excerpt != '') {
             $post_excerpt = sf_custom_excerpt($custom_excerpt, $excerpt_length);
         } else {
             $post_excerpt = sf_excerpt($excerpt_length);
         }
         $taxonomy_name = 'category';
         if ($post_type != "post") {
             $taxonomy_name = $post_type . '-category';
         }
         if ($taxonomy_name == "product-category") {
             $taxonomy_name = "product_cat";
         }
         $post_terms = get_the_terms($post->ID, $taxonomy_name);
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . strtolower($post_term->slug) . ' ';
             }
         }
         /* COLUMN VARIABLE CONFIG
            ================================================== */
         $item_class = "";
         if ($columns == "1") {
             $item_class = "col-sm-12 ";
         } else {
             if ($columns == "2") {
                 $item_class = "col-sm-6 ";
             } else {
                 if ($columns == "3") {
                     $item_class = "col-sm-4 ";
                 } else {
                     if ($columns == "4") {
                         $item_class = "col-sm-3 ";
                     } else {
                         if ($columns == "5") {
                             $item_class = "col-sm-sf-5 ";
                         }
                     }
                 }
             }
         }
         $masonry_thumb_size = sf_get_post_meta(get_the_ID(), 'sf_masonry_thumb_size', true);
         if ($display_type == "multi-size-masonry") {
             if ($fullwidth == "yes") {
                 if ($masonry_thumb_size == "") {
                     $masonry_thumb_size = "standard";
                 }
                 if ($masonry_thumb_size == "wide") {
                     $item_class = 'col-sm-6 size-wide ';
                 } else {
                     if ($masonry_thumb_size == "tall") {
                         $item_class = 'col-sm-3 size-tall ';
                     } else {
                         if ($masonry_thumb_size == "wide-tall") {
                             $item_class = 'col-sm-6 size-wide-tall ';
                         } else {
                             $item_class = 'col-sm-3 size-standard ';
                         }
                     }
                 }
             } else {
                 if ($masonry_thumb_size == "") {
                     $masonry_thumb_size = "standard";
                 }
                 if ($masonry_thumb_size == "wide") {
                     $item_class = 'col-sm-8 size-wide ';
                 } else {
                     if ($masonry_thumb_size == "tall") {
                         $item_class = 'col-sm-4 size-tall ';
                     } else {
                         if ($masonry_thumb_size == "wide-tall") {
                             $item_class = 'col-sm-8 size-wide-tall ';
                         } else {
                             $item_class = 'col-sm-4 size-standard ';
                         }
                     }
                 }
             }
         }
         /* DISPLAY TYPE CONFIG
            ================================================== */
         if ($display_type == "masonry" || $display_type == "masonry-gallery") {
             $item_class .= "masonry-item masonry-gallery-item";
         } else {
             if ($display_type == "gallery") {
                 $item_class .= "gallery-item ";
             } else {
                 if ($display_type == "multi-size-masonry") {
                     $item_class .= "multi-masonry-item ";
                 } else {
                     $item_class .= "standard ";
                 }
             }
         }
         /* LINK TYPE CONFIG
            ================================================== */
         $item_link = sf_portfolio_item_link();
         /* ITEM OUTPUT
            ================================================== */
         $portfolio_items_output .= '<li itemscope itemtype="http://schema.org/CreativeWork" data-id="id-' . $count . '" class="clearfix portfolio-item ' . $item_class . ' ' . $term_slug . '">' . "\n";
         $portfolio_items_output .= apply_filters('sf_before_portfolio_item_thumb', '');
         /* THUMBNAIL CONFIG
            ================================================== */
         if ($thumb_type != "none") {
             $portfolio_items_output .= sf_portfolio_thumbnail($display_type, $masonry_thumb_size, $multi_size_ratio, $columns, $hover_show_excerpt, $excerpt_length, $gutters, $fullwidth);
         }
         $portfolio_items_output .= apply_filters('sf_after_portfolio_item_thumb', '');
         if ($display_type != "gallery" && $display_type != "masonry-gallery" && $display_type != "multi-size-masonry") {
             $portfolio_items_output .= '<div class="portfolio-item-details">' . "\n";
             if ($show_title == "yes") {
                 $portfolio_items_output .= '<div class="comments-likes">';
                 if (function_exists('lip_love_it_link')) {
                     $portfolio_items_output .= lip_love_it_link(get_the_ID(), false);
                 }
                 $portfolio_items_output .= '</div>';
                 $portfolio_items_output .= '<h3 class="portfolio-item-title" itemprop="name headline"><a ' . $item_link['config'] . '>' . $item_title . '</a></h3>' . "\n";
             }
             if ($show_subtitle == "yes" && $item_subtitle) {
                 $portfolio_items_output .= '<h5 class="portfolio-subtitle" itemprop="name alternativeHeadline">' . $item_subtitle . '</h5>' . "\n";
             }
             if ($show_excerpt == "yes") {
                 $portfolio_items_output .= '<div class="portfolio-item-excerpt" itemprop="description">' . $post_excerpt . '</div>' . "\n";
             }
             $portfolio_items_output .= '</div>' . "\n";
         }
         $portfolio_items_output .= '</li>' . "\n";
         $count++;
     }
     wp_reset_query();
     wp_reset_postdata();
     $portfolio_items_output .= '</ul>' . "\n";
     /* PAGINATION OUTPUT
        ================================================== */
     if ($pagination == "yes") {
         if ($display_type == "masonry" || $display_type == "masonry-gallery") {
             $portfolio_items_output .= '<div class="pagination-wrap masonry-pagination">';
         } else {
             $portfolio_items_output .= '<div class="pagination-wrap">';
         }
         $portfolio_items_output .= pagenavi($portfolio_items);
         $portfolio_items_output .= '</div>';
     }
     /* FUNCTION OUTPUT
        ================================================== */
     return $portfolio_items_output;
 }
Example #16
0
 protected function content($atts, $content = null)
 {
     $options = get_option('sf_flexform_options');
     $rss_feed_url = $options['rss_feed_url'];
     $title = $width = $el_class = $output = $show_blog_aux = $blog_aux = $show_read_more = $items = $item_figure = $content_output = $el_position = $offset = '';
     extract(shortcode_atts(array('title' => '', 'show_blog_aux' => 'yes', "pagination" => "no", "blog_type" => "standard", 'show_title' => 'yes', 'show_excerpt' => 'yes', "show_details" => 'yes', "excerpt_length" => '20', 'show_read_more' => 'no', "item_count" => '5', "category" => '', "offset" => '0', "content_output" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $sidebar_config = get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
     global $sidebars;
     if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
         $sidebars = 'one-sidebar';
     } else {
         if ($sidebar_config == "both-sidebars") {
             $sidebars = 'both-sidebars';
         } else {
             $sidebars = 'no-sidebars';
         }
     }
     global $sidebars;
     $options = get_option('sf_flexform_options');
     $filter_wrap_bg = $options['filter_wrap_bg'];
     /* TOP AUX BUTTONS OUTPUT
        ================================================== */
     if ($show_blog_aux == "yes" && $sidebars == "no-sidebars") {
         $category_list = wp_list_categories('sort_column=name&title_li=&depth=-1&echo=0&show_count=1');
         $archive_list = wp_get_archives('type=monthly&limit=120&echo=0');
         $tags_list = wp_tag_cloud('smallest=12&largest=12&unit=px&format=list&number=50&orderby=name&echo=0');
         $blog_aux .= '<div class="blog-aux-wrap row">';
         // open .blog-aux-wrap
         $blog_aux .= '<ul class="blog-aux-options ' . $width . '">';
         // open .blog-aux-options
         // CATEGORIES
         $blog_aux .= '<li><a href="#" class="blog-slideout-trigger" data-aux="categories"><i class="icon-list"></i>' . __("Categories", "swiftframework") . '</a>';
         // TAGS
         $blog_aux .= '<li><a href="#" class="blog-slideout-trigger" data-aux="tags"><i class="icon-tags"></i>' . __("Tags", "swiftframework") . '</a>';
         // SEARCH FORM
         $blog_aux .= '<li class="blog-aux-search"><form method="get" class="search-form" action="' . home_url() . '/">';
         $blog_aux .= '<input type="text" placeholder="' . __("Search", "swiftframework") . '" name="s" />';
         $blog_aux .= '</form></li>';
         // ARCHIVES
         $blog_aux .= '<li><a href="#" class="blog-slideout-trigger" data-aux="archives"><i class="icon-list"></i>' . __("Archives", "swiftframework") . '</a>';
         // RSS LINK
         if ($rss_feed_url != "") {
             $blog_aux .= '<li><a href="' . $rss_feed_url . '" class="rss-link" target="_blank"><i class="icon-rss"></i>' . __("RSS", "swiftframework") . '</a>';
         }
         $blog_aux .= '</ul>';
         // close .blog-aux-options
         $blog_aux .= '</div>';
         // close .blog-aux-wrap
         $blog_aux .= '<div class="filter-wrap blog-filter-wrap row clearfix">';
         // open .blog-filter-wrap
         $blog_aux .= '<div class="filter-slide-wrap span12 alt-bg ' . $filter_wrap_bg . '">';
         if ($category_list != '') {
             $blog_aux .= '<ul class="aux-list aux-categories row clearfix">' . $category_list . '</ul>';
         }
         if ($tags_list != '') {
             $blog_aux .= '<ul class="aux-list aux-tags row clearfix">' . $tags_list . '</ul>';
         }
         if ($archive_list != '') {
             $blog_aux .= '<ul class="aux-list aux-archives row clearfix">' . $archive_list . '</ul>';
         }
         $blog_aux .= '</div></div>';
         // close .blog-filter-wrap
     }
     /* BLOG QUERY SETUP
        ================================================== */
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // BLOG QUERY SETUP
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'category_name' => $category_slug, 'posts_per_page' => $item_count, 'offset' => $offset);
     $blog_items = new WP_Query($blog_args);
     $list_class = '';
     if ($blog_type == "masonry") {
         $list_class .= 'masonry-items';
     } else {
         if ($blog_type == "mini") {
             $list_class .= 'mini-items';
         } else {
             $list_class .= 'standard-items';
         }
     }
     /* BLOG ITEMS OUTPUT
      		================================================== */
     $items .= '<ul class="blog-items row ' . $list_class . ' clearfix">';
     while ($blog_items->have_posts()) {
         $blog_items->the_post();
         $post_format = get_post_format();
         if ($post_format == "") {
             $post_format = 'standard';
         }
         $item_class = '';
         if ($blog_type == "mini") {
             $item_class = $width;
         } else {
             if ($blog_type == "masonry") {
                 if ($sidebars == "both-sidebars") {
                     $item_class = "span3";
                 } else {
                     $item_class = "span4";
                 }
             } else {
                 $item_class = $width;
             }
         }
         /* BLOG ITEM OUTPUT
         			================================================== */
         if ($blog_type == "masonry") {
             $items .= '<li class="blog-item recent-post ' . $item_class . ' format-' . $post_format . '">';
         } else {
             $items .= '<li class="blog-item ' . $item_class . ' format-' . $post_format . '">';
         }
         $items .= sf_get_post_item($post->ID, $blog_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more);
         $items .= '</li>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     /* PAGINATION OUTPUT
     			================================================== */
     if ($pagination == "yes") {
         if ($blog_type == "masonry") {
             $items .= '<div class="pagination-wrap masonry-pagination">';
         } else {
             $items .= '<div class="pagination-wrap">';
         }
         $items .= pagenavi($blog_items);
         $items .= '</div>';
     }
     /* FINAL OUTPUT
     			================================================== */
     $el_class = $this->getExtraClass($el_class);
     $output .= "\n\t" . '<div class="wpb_blog_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper blog-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading"><span>' . $title . '</span></h3></div>' : '';
     if ($show_blog_aux == "yes") {
         $output .= "\n\t\t\t\t" . $blog_aux;
     }
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     if ($blog_type == "masonry") {
         global $include_isotope;
         $include_isotope = true;
     }
     global $has_blog;
     $has_blog = true;
     return $output;
 }
Example #17
0
        the_permalink();
        ?>
" class="[ color-secondary ][ ]"><em>Leer más >></em></a>
						</div>
					</article>

				<?php 
    }
}
?>

		</div><!-- /row -->

	</section> <!-- /container -->

	<!-- pagination -->
	<div class="[ bg-gray ][ text-center ][ padding--top-bottom ]">
		<?php 
if ($blog->max_num_pages > 1) {
    $url = site_url('/blog/');
    pagenavi($pagina, $blog->max_num_pages, $url, true, '?', 'pagina');
} else {
    ?>
			<div class="no-pagination">pag 1 de 1</div>
		<?php 
}
?>
	</div>

<?php 
get_footer();
Example #18
0
 public function content($atts, $content = null)
 {
     $title = $order = $page_link = $text_size = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'text_size' => '', 'item_count' => '-1', 'order' => '', 'category' => '', 'pagination' => 'no', 'page_link' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     $next_icon = apply_filters('sf_next_icon', '<i class="ss-navigateright"></i>');
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // TESTIMONIAL QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     if ($pagination == "yes") {
         $order = "date";
     }
     $testimonials_args = array('orderby' => $order, 'post_type' => 'testimonials', 'post_status' => 'publish', 'paged' => $paged, 'testimonials-category' => $category_slug, 'posts_per_page' => $item_count);
     $testimonials = new WP_Query($testimonials_args);
     $items .= '<ul class="testimonials clearfix">';
     // TESTIMONIAL LOOP
     while ($testimonials->have_posts()) {
         $testimonials->the_post();
         $testimonial_text = get_the_content();
         $testimonial_cite = sf_get_post_meta($post->ID, 'sf_testimonial_cite', true);
         $testimonial_cite_subtext = sf_get_post_meta($post->ID, 'sf_testimonial_cite_subtext', true);
         $testimonial_image = rwmb_meta('sf_testimonial_cite_image', 'type=image', $post->ID);
         foreach ($testimonial_image as $detail_image) {
             $testimonial_image_url = $detail_image['url'];
             break;
         }
         if (!$testimonial_image) {
             $testimonial_image = get_post_thumbnail_id();
             $testimonial_image_url = wp_get_attachment_url($testimonial_image, 'full');
         }
         $testimonial_image = sf_aq_resize($testimonial_image_url, 70, 70, true, false);
         $items .= '<li class="testimonial">';
         $items .= '<div class="testimonial-text">' . do_shortcode($testimonial_text) . '</div>';
         $items .= '<div class="testimonial-cite">';
         if ($testimonial_image) {
             $items .= '<img src="' . $testimonial_image[0] . '" width="' . $testimonial_image[1] . '" height="' . $testimonial_image[2] . '" alt="' . $testimonial_cite . '" />';
             $items .= '<div class="cite-text has-cite-image"><span class="cite-name">' . $testimonial_cite . '</span><span>' . $testimonial_cite_subtext . '</span></div>';
         } else {
             $items .= '<div class="cite-text"><span class="cite-name">' . $testimonial_cite . '</span><span>' . $testimonial_cite_subtext . '</span></div>';
         }
         $items .= '</div>';
         $items .= '</li>';
     }
     wp_reset_query();
     wp_reset_postdata();
     $items .= '</ul>';
     if ($page_link == "yes") {
         global $sf_options;
         $testimonials_page = __($sf_options['testimonial_page'], 'swift-framework-plugin');
         if ($testimonials_page) {
             $items .= '<a href="' . get_permalink($testimonials_page) . '" class="read-more">' . __("More", 'swift-framework-plugin') . $next_icon . '</a>';
         }
     }
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($testimonials);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $el_class .= ' testimonial';
     $output .= "\n\t" . '<div class="spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb-asset-content testimonial-wrap ' . $text_size . '">';
     $output .= $title != '' ? "\n\t\t\t" . $this->spb_title($title, '') : '';
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
Example #19
0
<div class="box archive-meta">
	<h3 class="title-meta"><?php 
    _e('Apologies, but no results were found.', 'quench');
    ?>
</h3>
</div>
<?php 
}
?>

<?php 
if ($wp_query->max_num_pages > 1) {
    ?>
    <div class="pagination clearfix">
       <?php 
    pagenavi($range = 3);
    ?>
    </div>
<?php 
}
?>
</div>
</div>

<?php 
get_sidebar();
?>

<?php 
get_footer();
Example #20
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $filter = $social_icon_type = $items = $team_member_link_class = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_columns' => '3', 'display_type' => 'standard', 'carousel' => 'no', "item_count" => '12', "custom_image_height" => '', "category" => '', 'pagination' => '', 'post_ids' => '', 'profile_link' => 'yes', 'ajax_overlay' => 'no', 'fullwidth' => 'no', 'gutters' => 'yes', 'order' => 'desc', 'order_by' => 'date', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     $contact_icon = apply_filters('sf_mail_icon', '<i class="ss-mail"></i>');
     $phone_icon = apply_filters('sf_phone_icon', '<i class="ss-phone"></i>');
     /* SIDEBAR CONFIG
        ================================================== */
     global $sf_sidebar_config;
     $sidebars = '';
     if ($sf_sidebar_config == "left-sidebar" || $sf_sidebar_config == "right-sidebar") {
         $sidebars = 'one-sidebar';
     } else {
         if ($sf_sidebar_config == "both-sidebars") {
             $sidebars = 'both-sidebars';
         } else {
             $sidebars = 'no-sidebars';
         }
     }
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $team_args = array('post_type' => 'team', 'post_status' => 'publish', 'paged' => $paged, 'team-category' => $category_slug, 'posts_per_page' => $item_count, 'order' => $order, 'orderby' => $order_by, 'ignore_sticky_posts' => 1);
     if ($post_ids != "") {
         $team_args['post__in'] = array($post_ids);
     }
     $team_members = new WP_Query($team_args);
     $count = 0;
     $image_width = 270;
     $image_height = 270;
     if ($item_columns == "1") {
         $item_class = 'col-sm-12';
     } else {
         if ($item_columns == "2") {
             $image_width = 540;
             $image_height = 540;
             $item_class = 'col-sm-6';
         } else {
             if ($item_columns == "3") {
                 $image_width = 360;
                 $image_height = 360;
                 $item_class = 'col-sm-4';
             } else {
                 if ($item_columns == "5") {
                     $image_width = 360;
                     $image_height = 360;
                     $item_class = 'col-sm-sf-5';
                 } else {
                     $item_class = 'col-sm-3';
                 }
             }
         }
     }
     if ($custom_image_height != "") {
         $image_height = $custom_image_height;
     }
     $list_class = 'display-type-' . $display_type;
     if ($ajax_overlay == "yes") {
         $team_member_link_class = 'team-member-ajax';
     }
     if ($gutters == "no") {
         $list_class .= ' no-gutters';
     }
     if ($carousel == "yes") {
         global $sf_carouselID;
         if ($sf_carouselID == "") {
             $sf_carouselID = 1;
         } else {
             $sf_carouselID++;
         }
         $item_class = 'carousel-item';
         $items .= '<div class="team-carousel carousel-wrap"><div id="carousel-' . $sf_carouselID . '" class="team-members carousel-items ' . $list_class . ' clearfix" data-columns="' . $item_columns . '" data-auto="false">';
     } else {
         $items .= '<div class="team-members ' . $list_class . ' row clearfix">';
     }
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $postID = $post->ID;
         $member_name = get_the_title();
         $member_position = sf_get_post_meta($postID, 'sf_team_member_position', true);
         $custom_excerpt = sf_get_post_meta($postID, 'sf_custom_excerpt', true);
         $pb_active = get_post_meta($postID, '_spb_js_status', true);
         $member_link = get_permalink($postID);
         $member_bio = "";
         if ($pb_active == "true") {
             if ($custom_excerpt != "") {
                 $member_bio = $custom_excerpt;
             } else {
                 $member_bio = get_the_excerpt();
             }
         } else {
             if ($custom_excerpt != "") {
                 $member_bio = sf_custom_excerpt($custom_excerpt, 1000);
             } else {
                 $member_bio = apply_filters('the_content', get_the_content(''));
             }
         }
         $member_email = sf_get_post_meta($postID, 'sf_team_member_email', true);
         $member_phone = sf_get_post_meta($postID, 'sf_team_member_phone_number', true);
         $member_twitter = sf_get_post_meta($postID, 'sf_team_member_twitter', true);
         $member_facebook = sf_get_post_meta($postID, 'sf_team_member_facebook', true);
         $member_linkedin = sf_get_post_meta($postID, 'sf_team_member_linkedin', true);
         $member_google_plus = sf_get_post_meta($postID, 'sf_team_member_google_plus', true);
         $member_skype = sf_get_post_meta($postID, 'sf_team_member_skype', true);
         $member_instagram = sf_get_post_meta($postID, 'sf_team_member_instagram', true);
         $member_dribbble = sf_get_post_meta($postID, 'sf_team_member_dribbble', true);
         $view_profile_text = __("View Profile", 'swift-framework-plugin');
         $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
         $item_icon = apply_filters('sf_team_hover_icon', "fa-pencil");
         $item_svg_icon = apply_filters('sf_team_hover_svg_icon', "");
         $thumb_img_url = "";
         foreach ($thumb_image as $detail_image) {
             $thumb_image_id = $detail_image['ID'];
             $thumb_img_url = $detail_image['url'];
             break;
         }
         if (!$thumb_image) {
             $thumb_image = get_post_thumbnail_id();
             $thumb_image_id = $thumb_image;
             $thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
         }
         $image = sf_aq_resize($thumb_img_url, $image_width, $image_height, true, false);
         // Output
         $items .= '<div itemscope data-id="id-' . $count . '" class="clearfix team-member ' . $item_class . '">';
         if (sf_theme_supports('minimal-team-hover')) {
             $items .= '<div class="team-member-item-wrap">';
         }
         $items .= '<figure class="animated-overlay">';
         if (sf_theme_supports('minimal-team-hover') && $display_type != "gallery") {
             $items .= '<a class="team-member-link ' . $team_member_link_class . '" href="' . get_permalink() . '" data-id="' . $postID . '"></a>';
         }
         if ($display_type == "gallery") {
             $items .= '<a class="team-gallery-mobile-link" href="' . get_permalink() . '" class="' . $team_member_link_class . '" data-id="' . $postID . '"></a>';
         }
         if ($image) {
             $items .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $member_name . '" />';
         }
         $items .= '<figcaption class="team-' . $display_type . '">';
         if (sf_theme_supports('minimal-team-hover') && $display_type != "gallery") {
             $items .= '<div class="thumb-info thumb-info-alt">';
             if ($item_svg_icon != "") {
                 $items .= $item_svg_icon;
             } else {
                 $items .= '<i class="' . $item_icon . '"></i>';
             }
             $items .= '</div>';
         } else {
             $items .= '<div class="thumb-info">';
             if ($display_type == "gallery") {
                 if ($profile_link == "yes") {
                     $items .= '<h4 class="team-member-name"><a href="' . get_permalink() . '" class="' . $team_member_link_class . '" data-id="' . $postID . '">' . $member_name . '</a></h4>';
                 } else {
                     $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
                 }
                 $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
                 $items .= '<div class="name-divide"></div>';
             }
             if ($member_twitter || $member_facebook || $member_linkedin || $member_google_plus || $member_skype || $member_instagram || $member_dribbble) {
                 $items .= '<ul class="social-icons">';
                 if ($member_twitter) {
                     $items .= '<li class="twitter"><a href="http://www.twitter.com/' . $member_twitter . '" target="_blank"><i class="fa-twitter"></i><i class="fa-twitter"></i></a></li>';
                 }
                 if ($member_facebook) {
                     $items .= '<li class="facebook"><a href="' . $member_facebook . '" target="_blank"><i class="fa-facebook"></i><i class="fa-facebook"></i></a></li>';
                 }
                 if ($member_linkedin) {
                     $items .= '<li class="linkedin"><a href="' . $member_linkedin . '" target="_blank"><i class="fa-linkedin"></i><i class="fa-linkedin"></i></a></li>';
                 }
                 if ($member_google_plus) {
                     $items .= '<li class="googleplus"><a href="' . $member_google_plus . '" target="_blank"><i class="fa-google-plus"></i><i class="fa-google-plus"></i></a></li>';
                 }
                 if ($member_skype) {
                     $items .= '<li class="skype"><a href="skype:' . $member_skype . '" target="_blank"><i class="fa-skype"></i><i class="fa-skype"></i></a></li>';
                 }
                 if ($member_instagram) {
                     $items .= '<li class="instagram"><a href="' . $member_instagram . '" target="_blank"><i class="fa-instagram"></i><i class="fa-instagram"></i></a></li>';
                 }
                 if ($member_dribbble) {
                     $items .= '<li class="dribbble"><a href="http://www.dribbble.com/' . $member_dribbble . '" target="_blank"><i class="fa-dribbble"></i><i class="fa-dribbble"></i></a></li>';
                 }
                 $items .= '</ul>';
             }
             if ($display_type != "gallery" && $profile_link == "yes") {
                 $items .= '<a class="view-profile ' . $team_member_link_class . '" href="' . $member_link . '" data-id="' . $postID . '">' . $view_profile_text . '</a>';
             }
             $items .= '</div>';
         }
         $items .= '</figcaption>';
         $items .= '</figure>';
         if (sf_theme_supports('minimal-team-hover')) {
             $items .= '<div class="team-member-details-wrap">';
         }
         if ($display_type != "gallery") {
             if ($profile_link == "yes") {
                 $items .= '<h4 class="team-member-name"><a href="' . get_permalink() . '" class="' . $team_member_link_class . '" data-id="' . $postID . '">' . $member_name . '</a></h4>';
             } else {
                 $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
             }
             $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
         }
         if ($display_type == "standard") {
             if (sf_theme_supports('minimal-team-hover')) {
                 $items .= '<div class="team-member-divider"></div>';
             }
             if ($profile_link == "yes") {
                 $items .= '<div class="team-member-bio">' . $member_bio . '<a href="' . get_permalink() . '" class="read-more ' . $team_member_link_class . '" data-id="' . $postID . '">' . $view_profile_text . '</a></div>';
             } else {
                 $items .= '<div class="team-member-bio">' . $member_bio . '</div>';
                 $items .= '<ul class="member-contact">';
                 if ($member_email) {
                     $items .= '<li>' . $contact_icon . '<span itemscope="email"><a href="mailto:' . $member_email . '">' . $member_email . '</a></span></li>';
                 }
                 if ($member_phone) {
                     $items .= '<li>' . $phone_icon . '<span itemscope="telephone">' . $member_phone . '</span></li>';
                 }
                 $items .= '</ul>';
             }
         }
         if (sf_theme_supports('minimal-team-hover')) {
             $items .= '</div>';
             $items .= '</div>';
         }
         $items .= '</div>';
         $count++;
     }
     wp_reset_postdata();
     if ($carousel == "yes") {
         $items .= '</div></div>';
     } else {
         $items .= '</div>';
     }
     // PAGINATION
     if ($pagination == "yes" && $carousel == "no") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list carousel-asset spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb-asset-content">';
     if ($fullwidth == "yes" && $sidebars == "no-sidebars") {
         $output .= "\n\t\t" . '<div class="title-wrap container">';
         if ($title != '') {
             $output .= '<h3 class="spb-heading"><span>' . $title . '</span></h3>';
         }
         if ($carousel == "yes") {
             $output .= spb_carousel_arrows();
         }
         $output .= '</div>';
     } else {
         $output .= "\n\t\t" . '<div class="title-wrap clearfix">';
         if ($title != '') {
             $output .= '<h3 class="spb-heading"><span>' . $title . '</span></h3>';
         }
         if ($carousel == "yes") {
             $output .= spb_carousel_arrows();
         }
         $output .= '</div>';
     }
     $output .= "\n\t\t" . $items;
     $output .= "\n\t\t" . '</div>';
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     if ($fullwidth == "yes" && $sidebars == "no-sidebars") {
         $output = $this->startRow($el_position, '', true) . $output . $this->endRow($el_position, '', true);
     } else {
         $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     }
     global $sf_include_isotope, $sf_has_team, $sf_include_carousel;
     $sf_include_isotope = true;
     $sf_has_team = true;
     if ($carousel == "yes") {
         $sf_include_carousel = true;
     }
     return $output;
 }
			
			<?php 
} else {
    ?>
			
			<h3><?php 
    _e("Sorry, there are no posts to display.", "swiftframework");
    ?>
</h3>
		
			<?php 
}
?>
			
			<div class="pagination-wrap">
				<?php 
echo pagenavi($wp_query);
?>
									
			</div>
			
		</div>
	
	<!-- CLOSE page -->
	</div>
	
</div>

<!--// WordPress Hook //-->
<?php 
get_footer();
Example #22
0
 public function content($atts, $content = null)
 {
     $title = $order = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'order' => '', 'category' => '', 'pagination' => 'no', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // JOBS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $jobs_args = array('orderby' => $order, 'post_type' => 'jobs', 'post_status' => 'publish', 'paged' => $paged, 'jobs-category' => $category_slug, 'posts_per_page' => $item_count);
     $jobs = new WP_Query($jobs_args);
     $items .= '<ul class="jobs clearfix">';
     // JOBS LOOP
     while ($jobs->have_posts()) {
         $jobs->the_post();
         $job_title = get_the_title();
         $job_date = get_the_date();
         $job_text = get_the_excerpt();
         $job_image = get_post_thumbnail_id();
         $job_image_url = wp_get_attachment_url($job_image, 'full');
         $image = sf_aq_resize($job_image_url, 90, NULL, true, false);
         $items .= '<li class="job">';
         if ($image) {
             $items .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
             $items .= '<div class="job-details has-job-image">';
         } else {
             $items .= '<div class="job-details">';
         }
         $items .= '<span class="job-date">' . $job_date . '</span>';
         $items .= '<h5>' . $job_title . '</h5>';
         $items .= '<div class="job-text">' . do_shortcode($job_text) . '</div>';
         $items .= '<a href="' . get_permalink() . '" class="read-more">' . __("Learn more", "swiftframework") . '</a>';
         $items .= '</div>';
         $items .= '</li>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($jobs);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper jobs-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
Example #23
0
function ajax_paged()
{
    if (isset($_GET['action']) && $_GET['action'] == 'ajax_paged') {
        $paged_num = $_GET['paged'];
        query_posts($query_string . '&posts_per_page=8&paged=' . $paged_num);
        ?>
		<?php 
        if (have_posts()) {
            ?>
			<div id="rc_post_hd" class="box_hd">
				<div id="rc_post_title" class="box_fl">
					<i></i><strong>最新文章</strong>
				</div>
				<div id="rc_post_cat" class="box_fr">
					<ul>
						<li><a title="<?php 
            bloginfo('name');
            ?>
" href="<?php 
            bloginfo('url');
            ?>
" class="current all">全部</a></li>
						<?php 
            wp_list_categories('title_li=&hierarchical=1&depth=1&hide_empty=0&include=118,90,132');
            ?>
					</ul>
				</div>
			</div>
			<div id="rc_post_bd" class="box_bd">
				<ul class="clearfix">
					<?php 
            while (have_posts()) {
                the_post();
                ?>
					<li>
						<div class="post_title">
							<h2><?php 
                the_title();
                ?>
</h2>
						</div>
						<div class="post_img">
							<?php 
                post_thumbnail(215, 215);
                ?>
						</div>
						<div class="post_more">
							<a href="javascript:;" class="png"></a>
						</div>
						<div class="post_mask png"></div>
						<div class="post_link"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
">阅读全文</a></div>
					</li>
					<?php 
            }
            ?>
				</ul>
			</div>
			
			<!-- S Pagenavi -->
			<?php 
            pagenavi();
            ?>
			<!-- E Pagenavi -->
		<?php 
        }
        ?>
	<?php 
        die;
    } else {
        return;
    }
}
Example #24
0
        }
    }
}
wp_reset_query();
$output .= '
		</div>';
$output .= '
	</div>';
$infinite_scroll_class_nav = null;
if ($portfolio_infinite_scroll == true && $portfolio_infinite_scroll_method == "twitter") {
    $infinite_scroll_class_nav = ' twitter-style';
} else {
    if ($portfolio_infinite_scroll == true && $portfolio_infinite_scroll_method == "manual") {
        $infinite_scroll_class_nav = ' manual-style';
    } else {
        $infinite_scroll_class_nav = '';
    }
}
if ($portfolio_pagination == "yes" && $portfolio_layout == "grid-portfolio" || $portfolio_pagination == "yes" && $portfolio_layout == "masonry-portfolio" || $portfolio_pagination == "yes" && $portfolio_layout == "listed-portfolio" || $portfolio_pagination == "yes" && $portfolio_layout == "masonry-block-portfolio") {
    $output .= '
	<div class="portfolio-pagination-wrap ' . $portfolio_full . $infinite_scroll_output . $infinite_scroll_class_nav . '">';
    if ($portfolio_pagination == "yes" && $portfolio_infinite_scroll == true) {
        $output .= '<div class="loader-infinite"></div>';
        $output .= pagenavi_infinite($my_query);
    } else {
        $output .= pagenavi($my_query);
    }
    $output .= '
	</div>';
}
echo $output . $this->endBlockComment('az_portfolio_grid');
Example #25
0
</p>
											</div>
										</div>
									</a>
								</div>
							</div>

						<?php 
    }
}
wp_reset_postdata();
?>
					
				</div>
			</div>
		</div>
	</div>

	<div class="pagination-content">
		<?php 
if ($ultimas_noticias->max_num_pages > 1) {
    $url = site_url('/noticias/');
    pagenavi($pagina, $ultimas_noticias->max_num_pages, $url, true);
    ?>
		<?php 
}
?>
	</div>

<?php 
get_footer();
Example #26
0
 function sf_directory_items($excerpt_length, $pagination, $item_count, $directory_cat)
 {
     /* OUTPUT VARIABLE
        ================================================== */
     $directory_items_output = $grid_size = "";
     $count = 0;
     $order = "standard";
     /* DIRECTORY QUERY SETUP
        ================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $order_mode = $order_by = "";
     if ($order == "standard") {
         $order_mode = "DESC";
         $order_by = "date";
     } else {
         if ($order == "date-asc") {
             $order_mode = "ASC";
             $order_by = "date";
         } else {
             if ($order == "title-desc") {
                 $order_mode = "DESC";
                 $order_by = "title";
             } else {
                 if ($order == "title-asc") {
                     $order_mode = "ASC";
                     $order_by = "title";
                 }
             }
         }
     }
     $tax_query = array();
     $tax_query_category = array();
     $tax_query_location = array();
     if (isset($directory_cat) && $directory_cat != '' && $directory_cat != 'All') {
         $directory_cat_array = array();
         $directory_cat_array = explode(",", $directory_cat);
         $tax_query_category = array('taxonomy' => 'directory-category', 'field' => 'slug', 'terms' => $directory_cat_array);
         array_push($tax_query, $tax_query_category);
     }
     if (isset($_POST['dir-category-id']) && $_POST['dir-category-id'] != '' && $_POST['dir-category-id'] != 'All') {
         $category_term = $_POST['dir-category-id'];
         $tax_query_category = array('taxonomy' => 'directory-category', 'field' => 'slug', 'terms' => array($category_term));
         array_push($tax_query, $tax_query_category);
     }
     if (isset($_POST['dir-location-id']) && $_POST['dir-location-id'] != '' && $_POST['dir-location-id'] != 'All') {
         $location_term = $_POST['dir-location-id'];
         $tax_query_location = array('taxonomy' => 'directory-location', 'field' => 'slug', 'terms' => array($location_term));
         array_push($tax_query, $tax_query_location);
     }
     $search_term = "";
     if (isset($_POST['dir-search-value'])) {
         $search_term = $_POST['dir-search-value'];
     }
     //Get all itens when there is no pagination
     if ($pagination != 'yes') {
         $item_count = -1;
     }
     $directory_args = array('s' => $search_term, 'post_type' => 'directory', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'order' => $order_mode, 'orderby' => $order_by, 'tax_query' => $tax_query, 'meta_query' => array('relation' => 'AND', array('key' => 'sf_directory_address', 'value' => '', 'compare' => '!=')));
     $directory_items = new WP_Query($directory_args);
     /* ITEMS OUTPUT
        ================================================== */
     global $sf_options;
     $directory_items_output .= '<div class="directory-list-results">';
     while ($directory_items->have_posts()) {
         $directory_items->the_post();
         $directory_items_output .= '<div class="directory-item clearfix">';
         /* META VARIABLES
            ================================================== */
         $item_title = get_the_title();
         $img_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumb-image');
         $pin_link = esc_url(sf_get_post_meta($post->ID, 'sf_directory_pin_link', true));
         $pin_button_text = sf_get_post_meta($post->ID, 'sf_directory_pin_button_text', true);
         $custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
         $post_excerpt = '';
         if ($excerpt_length != '') {
             if ($custom_excerpt != '') {
                 $post_excerpt = sf_custom_excerpt($custom_excerpt, $excerpt_length);
             } else {
                 $post_excerpt = sf_excerpt($excerpt_length);
             }
         } else {
             $post_excerpt = sf_excerpt(200);
         }
         $post_excerpt .= ' <a class="read-more-directory" href="' . get_permalink($post->ID) . '">  ' . __('Read More', 'swiftframework') . '</a>';
         $post_terms = get_the_terms($post->ID, 'directory-category');
         $term_slug = " ";
         $category_list_text = "";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . $post_term->slug . ' ';
                 $category_list_text .= $post_term->name . ' | ';
             }
         }
         $category_list_text = rtrim($category_list_text, "| ");
         $location_terms = get_the_terms($post->ID, 'directory-location');
         $location_text = "";
         if (!empty($location_terms)) {
             foreach ($location_terms as $location_term) {
                 $location_text .= $location_term->name . ' | ';
             }
             $location_text = rtrim($location_text, "| ");
             if ($category_list_text != '') {
                 $location_text = '| ' . $location_text;
             }
         }
         /* ITEM OUTPUT
            ================================================== */
         if (isset($img_src[0])) {
             $directory_items_output .= '<figure class="animated-overlay overlay-alt">';
             $directory_items_output .= '<img itemprop="image" src="' . $img_src[0] . '" alt="' . $item_title . '">';
             $directory_items_output .= '<a href="' . get_permalink($post->ID) . '" class="link-to-post"></a><div class="figcaption-wrap"></div>';
             $directory_items_output .= '<figcaption><div class="thumb-info"><h4>' . $item_title . '</h4></div></figcaption></figure>';
             $item_left_margin = "";
         } else {
             $item_left_margin = "dir-item-no-margin";
         }
         $directory_items_output .= '<div class="directory-item-details ' . $item_left_margin . '"><h3>' . $item_title . '</h3>';
         $directory_items_output .= '<div class="item-meta">' . $category_list_text . ' ' . $location_text . '</div><div class="excerpt" itemprop="description">' . $post_excerpt . '</div>';
         if ($pin_button_text != '' && $pin_link != '') {
             $directory_items_output .= '<a class="read-more-button" href="' . $pin_link . '" target="_blank">' . $pin_button_text . '</a>';
         }
         $directory_items_output .= '</div></div>';
         $count++;
     }
     wp_reset_query();
     wp_reset_postdata();
     /* PAGINATION OUTPUT
        ================================================== */
     if ($pagination == "yes") {
         $directory_items_output .= pagenavi($directory_items, '<div class="pagination-wrap">', '</div>');
     }
     $directory_items_output .= '</div>';
     /* FUNCTION OUTPUT
        ================================================== */
     return $directory_items_output;
 }
Example #27
0
     <div class="post">
       <h2>記事はありません</h2>
       <p>お探しの記事は見つかりませんでした</p>
      </div>
      
      <?php 
}
?>
      
      <!-- pager -->
      <div class="navigation">
      <!--      1ページより多かったらtrue(条件分岐)-->
<?php 
if ($wp_query->max_num_pages > 1) {
    $args = array('prev_text' => '前へ', 'next_text' => '次へ', 'class_name' => 'pagination');
    pagenavi($args);
    ?>
      <!-- /pager	 -->
    
        <?php 
}
?>
 </div>
        <!-- 一番上に戻るボタン-->
<!-- <div id="page-top"></div>-->
 </div>

<div id="container" class="row">
    <?php 
get_sidebar();
?>
Example #28
0
        comments_popup_link('0 条评论', ' 1 条评论', '% 条评论');
        ?>
</li>
				</ul>
				<div class="post-content">
					<?php 
        the_content('- 阅读剩余部分 -');
        ?>

				</div>
			</article>
		<?php 
    }
}
?>

		<?php 
pagenavi();
?>

	</div>
</div>
<?php 
get_sidebar();
?>

<?php 
get_footer();
?>

Example #29
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $filter_output = $output = $tax_terms = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'display_type' => 'standard', 'columns' => '4', 'show_title' => 'yes', 'show_subtitle' => 'yes', 'show_excerpt' => 'no', "excerpt_length" => '20', 'item_count' => '-1', 'category' => '', 'portfolio_filter' => 'yes', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $sidebar_config = get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
     $sidebars = '';
     if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
         $sidebars = 'one-sidebar';
     } else {
         if ($sidebar_config == "both-sidebars") {
             $sidebars = 'both-sidebars';
         } else {
             $sidebars = 'no-sidebars';
         }
     }
     $options = get_option('sf_flexform_options');
     $filter_wrap_bg = $options['filter_wrap_bg'];
     if ($portfolio_filter == "yes" && $sidebars == "no-sidebars") {
         $tax_terms = "";
         if ($category == "" || $category == "All") {
             $tax_terms = $tax_terms = get_category_list('portfolio-category', 1, "");
         } else {
             $tax_terms = $tax_terms = get_category_list('portfolio-category', 1, $category);
         }
         $filter_output .= '<div class="filter-wrap row clearfix">' . "\n";
         $filter_output .= '<a href="#" class="select"><i class="icon-align-justify"></i>' . __("Filter our work", "swiftframework") . '</a>' . "\n";
         $filter_output .= '<div class="filter-slide-wrap span12 alt-bg ' . $filter_wrap_bg . '">' . "\n";
         $filter_output .= '<ul class="portfolio-filter filtering row clearfix">' . "\n";
         $filter_output .= '<li class="all selected span2"><a data-filter="*" href="#"><span class="item-name">' . __("All", "swiftframework") . '</span><span class="item-count">0</span></a></li>' . "\n";
         foreach ($tax_terms as $tax_term) {
             $term_slug = strtolower(str_replace(' ', '-', $tax_term));
             $filter_output .= '<li class="span2"><a href="#" title="View all ' . $tax_term . ' items" class="' . $term_slug . '" data-filter=".' . $term_slug . '"><span class="item-name">' . $tax_term . '</span><span class="item-count">0</span></a></li>' . "\n";
         }
         $filter_output .= '</ul></div></div>' . "\n";
     }
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // PORTFOLIO QUERY SETUP
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
     } else {
         $paged = 1;
     }
     $portfolio_args = array('post_type' => 'portfolio', 'post_status' => 'publish', 'paged' => $paged, 'portfolio-category' => $category_slug, 'posts_per_page' => $item_count);
     $portfolio_items = new WP_Query($portfolio_args);
     $count = 0;
     if ($columns == "1") {
         $items .= '<ul class="portfolio-items ' . $display_type . '-portfolio single-column filterable-items row clearfix">' . "\n";
     } else {
         $items .= '<ul class="portfolio-items ' . $display_type . '-portfolio filterable-items row clearfix">' . "\n";
     }
     // PORTFOLIO LOOP
     while ($portfolio_items->have_posts()) {
         $portfolio_items->the_post();
         // META VARIABLES
         $thumb_image = $thumb_gallery = $video = $item_class = $link_config = '';
         $thumb_width = 420;
         $thumb_height = 315;
         $video_height = 315;
         $thumb_type = get_post_meta($post->ID, 'sf_thumbnail_type', true);
         $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
         $thumb_video = get_post_meta($post->ID, 'sf_thumbnail_video_url', true);
         if ($columns == "1") {
             $thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image-onecol');
         } else {
             if ($columns == "2") {
                 $thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image-twocol');
             } else {
                 $thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image');
             }
         }
         $thumb_link_type = get_post_meta($post->ID, 'sf_thumbnail_link_type', true);
         $thumb_link_url = get_post_meta($post->ID, 'sf_thumbnail_link_url', true);
         $thumb_lightbox_thumb = rwmb_meta('sf_thumbnail_image', 'type=image&size=large');
         $thumb_lightbox_image = rwmb_meta('sf_thumbnail_link_image', 'type=image&size=large');
         $thumb_lightbox_video_url = get_post_meta($post->ID, 'sf_thumbnail_link_video_url', true);
         foreach ($thumb_image as $detail_image) {
             $thumb_img_url = $detail_image['url'];
             break;
         }
         if (!$thumb_image) {
             $thumb_image = get_post_thumbnail_id();
             $thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
         }
         $thumb_lightbox_img_url = wp_get_attachment_url($thumb_lightbox_image, 'full');
         $item_title = get_the_title();
         $item_subtitle = get_post_meta($post->ID, 'sf_portfolio_subtitle', true);
         $permalink = get_permalink();
         $custom_excerpt = get_post_meta($post->ID, 'sf_custom_excerpt', true);
         $post_excerpt = '';
         if ($custom_excerpt != '') {
             $post_excerpt = custom_excerpt($custom_excerpt, $excerpt_length);
         } else {
             $post_excerpt = excerpt($excerpt_length);
         }
         $post_terms = get_the_terms($post->ID, 'portfolio-category');
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . strtolower(str_replace(' ', '-', $post_term->name)) . ' ';
             }
         }
         // COLUMN OPTION VARIABLES
         $item_class = $item_icon = "";
         if ($columns == "1") {
             if ($sidebars == "both-sidebars") {
                 $item_class = "span6 ";
             } else {
                 if ($sidebars == "one-sidebar") {
                     $item_class = "span8 ";
                 } else {
                     $item_class = "span10 offset1 ";
                 }
             }
             $excerpt = get_the_excerpt();
             $thumb_width = 970;
             $thumb_height = NULL;
             $video_height = 545;
         } else {
             if ($columns == "2") {
                 if ($sidebars == "both-sidebars") {
                     $item_class = "span3 ";
                 } else {
                     if ($sidebars == "one-sidebar") {
                         $item_class = "span4 ";
                     } else {
                         $item_class = "span6 ";
                         $thumb_width = 600;
                         $thumb_height = 450;
                         $video_height = 450;
                     }
                 }
             } else {
                 if ($columns == "3") {
                     if ($sidebars == "both-sidebars") {
                         $item_class = "span2 ";
                     } else {
                         if ($sidebars == "one-sidebar") {
                             $item_class = "span-third ";
                         } else {
                             $item_class = "span4 ";
                         }
                     }
                 } else {
                     if ($columns == "4") {
                         if ($sidebars == "both-sidebars") {
                             $item_class = "span3 ";
                         } else {
                             if ($sidebars == "one-sidebar") {
                                 $item_class = "span2 ";
                             } else {
                                 $item_class = "span3 ";
                             }
                         }
                     }
                 }
             }
         }
         // DISPLAY TYPE VARIABLES
         if ($display_type == "standard") {
             $item_class .= "standard ";
         } else {
             if ($display_type == "gallery") {
                 $item_class .= "gallery ";
             }
         }
         // LINK TYPE VARIABLES
         if ($thumb_link_type == "link_to_url") {
             $link_config = 'href="' . $thumb_link_url . '" class="link-to-url"';
             $item_icon = "link";
         } else {
             if ($thumb_link_type == "link_to_url_nw") {
                 $link_config = 'href="' . $thumb_link_url . '" class="link-to-url" target="_blank"';
                 $item_icon = "link";
             } else {
                 if ($thumb_link_type == "lightbox_thumb") {
                     $link_config = 'href="' . $thumb_img_url . '" class="view"';
                     $item_icon = "search";
                 } else {
                     if ($thumb_link_type == "lightbox_image") {
                         $lightbox_image_url = '';
                         foreach ($thumb_lightbox_image as $image) {
                             $lightbox_image_url = $image['full_url'];
                         }
                         $link_config = 'href="' . $lightbox_image_url . '" class="view"';
                         $item_icon = "search";
                     } else {
                         if ($thumb_link_type == "lightbox_video") {
                             $link_config = 'href="' . $thumb_lightbox_video_url . '" rel="prettyPhoto"';
                             $item_icon = "facetime-video";
                         } else {
                             $link_config = 'href="' . $permalink . '" class="link-to-post"';
                             $item_icon = "chevron-right";
                         }
                     }
                 }
             }
         }
         $items .= '<li data-id="id-' . $count . '" class="clearfix portfolio-item ' . $item_class . ' ' . $term_slug . '">' . "\n";
         if ($thumb_type != "none") {
             $items .= '<figure>' . "\n";
             // THUMBNAIL MEDIA TYPE SETUP
             if ($thumb_type == "video") {
                 $video = video_embed($thumb_video, $thumb_width, $video_height);
                 $items .= $video;
             } else {
                 if ($thumb_type == "slider") {
                     $items .= '<div class="flexslider thumb-slider"><ul class="slides">' . "\n";
                     foreach ($thumb_gallery as $image) {
                         $items .= "<li><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></li>" . "\n";
                     }
                     $items .= '</ul><div class="open-item"><a ' . $link_config . '><i class="icon-plus"></i></a></div></div>' . "\n";
                 } else {
                     $image = aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                     if ($image) {
                         $items .= '<a ' . $link_config . '>' . "\n";
                         if ($columns != "1") {
                             $items .= '<div class="overlay"><div class="thumb-info">' . "\n";
                             if ($display_type == "standard") {
                                 $items .= '<i class="icon-' . $item_icon . '"></i>' . "\n";
                             } else {
                                 $items .= '<h4>' . $item_title . '</h4>' . "\n";
                                 $items .= '<i class="icon-' . $item_icon . ' small-icon"></i>' . "\n";
                             }
                             $items .= '</div></div>' . "\n";
                         }
                         $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />' . "\n";
                         $items .= '</a>' . "\n";
                     }
                 }
             }
             $items .= '</figure>' . "\n";
         }
         // MASONRY ITEM
         if ($display_type == "standard") {
             $items .= '<div class="portfolio-item-details">' . "\n";
             if ($show_title == "yes") {
                 if ($columns == "1") {
                     $items .= '<h1 class="portfolio-item-title"><a ' . $link_config . '>' . $item_title . '</a></h1>' . "\n";
                 } else {
                     $items .= '<h4 class="portfolio-item-title"><a ' . $link_config . '>' . $item_title . '</a></h4>' . "\n";
                 }
             }
             if ($show_subtitle == "yes" && $item_subtitle) {
                 if ($columns == "1") {
                     $items .= '<h3 class="portfolio-subtitle">' . $item_subtitle . '</h3>' . "\n";
                 } else {
                     $items .= '<h5 class="portfolio-subtitle">' . $item_subtitle . '</h5>' . "\n";
                 }
             }
             if ($show_excerpt == "yes") {
                 $items .= '<div class="portfolio-item-excerpt">' . $post_excerpt . '</div>' . "\n";
             }
             $items .= '</div>' . "\n";
         }
         $items .= '</li>' . "\n";
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>' . "\n";
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">' . "\n";
         $items .= pagenavi($portfolio_items);
         $items .= '</div>' . "\n";
     }
     // PAGE BUILDER OUPUT
     $width = wpb_translateColumnWidthToSpan($width);
     $el_class = $this->getExtraClass($el_class);
     $output .= "\n\t" . '<div class="wpb_portfolio_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper portfolio-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>' : '';
     if ($portfolio_filter == "yes") {
         $output .= "\n\t\t\t" . $filter_output;
     }
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $include_isotope;
     global $has_portfolio;
     $include_isotope = true;
     $has_portfolio = true;
     return $output;
 }