Example #1
0
 function shortcode_portfolio_masonry($atts, $content = null)
 {
     extract(shortcode_atts(array('tax' => 'cat', 'columns' => '4', 'counts' => '12', 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'filter' => 'yes', 'paging' => 'yes'), $atts));
     if (!in_array($tax, array('cat', 'tag'), true)) {
         return $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the taxonomy option, the current tax is not match!', 'Twoot_Toolkit') . '</div>';
     }
     $q = new Twoot_Template_Grid(array('columns' => $columns, 'counts' => $counts, 'cats' => $cats, 'posts' => $posts, 'order' => $order, 'orderby' => $orderby, 'filter' => $filter, 'paging' => $paging, 'post_type' => 'portfolio', 'taxonomy' => 'portfolio_' . $tax));
     return $q->masonry();
 }