Beispiel #1
0
    ?>

        <?php 
    /* Uses page-parts/portfolio-masonry.php template */
    $columns = sq_option('portfolio_per_row', 4);
    $display_type = sq_option('portfolio_style', 'default');
    $title_style = sq_option('portfolio_title_style', 'default');
    $show_filter = sq_option('portfolio_filter', 'yes');
    $excerpt = sq_option('portfolio_excerpt', '1') == '1' ? 'yes' : 'no';
    $img_width = '';
    $img_height = '';
    $image_size = sq_option('portfolio_image', '');
    $img_array = explode('x', strtolower($image_size));
    if (isset($img_array[1])) {
        $img_width = $img_array[0];
        $img_height = $img_array[1];
    }
    echo kleo_portfolio_items($display_type, $title_style, $columns, NULL, 'yes', $show_filter, $excerpt, $img_width, $img_height);
    ?>

    <?php 
}
?>


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

<?php 
get_footer();
 function kleo_portfolio_func($atts, $content = null)
 {
     $output = $display_type = $title_style = $columns = $item_count = $pagination = $filter = $excerpt = $image_size = $category = $exclude_categories = $el_class = '';
     extract(shortcode_atts(array('display_type' => 'default', 'title_style' => 'standard', 'columns' => 4, 'item_count' => NULL, 'pagination' => 'no', 'filter' => 'yes', 'excerpt' => 1, 'image_size' => '', 'category' => '', 'exclude_categories' => '', 'el_class' => ''), $atts));
     $class = '';
     if ($el_class != '') {
         $class = ' ' . $el_class;
     }
     if ($exclude_categories != '') {
         $exclude_categories = explode(',', $exclude_categories);
     }
     $img_width = $img_height = '';
     if ($image_size != '') {
         $img_array = explode('x', strtolower($image_size));
         if (isset($img_array[1])) {
             $img_width = $img_array[0];
             $img_height = $img_array[1];
         }
     }
     $output .= '<div class="wpb_wrapper' . $class . '">';
     $output .= kleo_portfolio_items($display_type, $title_style, $columns, $item_count, $pagination, $filter, $excerpt, $img_width, $img_height, $category, $exclude_categories);
     $output .= '</div>';
     return $output;
 }