Beispiel #1
0
 function render($atts)
 {
     $this->block_uid = uniqid();
     //update unique id on each render
     global $post;
     extract(shortcode_atts(array('limit' => 5, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'show_child_cat' => '', 'tag_slug' => '', 'header_color' => ''), $atts));
     $buffy = '';
     //output buffer
     //go only on one category that was selected from drop down
     if (!empty($category_id) and empty($category_ids)) {
         $atts['category_ids'] = $category_id;
     }
     //do the query
     $tt_data_source = new tt_data_source();
     //new data source
     $tt_query =& $tt_data_source->get_wp_query($atts);
     //by ref  do the query
     // Block Title
     $buffy .= $this->get_block_title($atts, $tt_data_source);
     $buffy .= '<div class="b_block b_1 clearfix">';
     //inner content of the block
     $buffy .= $this->inner($tt_query->posts);
     $buffy .= '</div> <!-- ./block1 -->';
     return $buffy;
 }
 function render($atts)
 {
     $this->block_uid = uniqid();
     //update unique id on each render
     global $post;
     extract(shortcode_atts(array('limit' => 5, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'show_child_cat' => '', 'tag_slug' => '', 'header_color' => ''), $atts));
     $buffy = '';
     //output buffer
     $tt_unique_id = uniqid();
     //go only on one category that was selected from drop down
     if (!empty($category_id) and empty($category_ids)) {
         $atts['category_ids'] = $category_id;
     }
     $tt_data_source = new tt_data_source();
     //new data source
     $tt_query =& $tt_data_source->get_wp_query($atts);
     //by ref  do the query
     $buffy .= '<div class="b_5 mbf"><div class="post_thumbnail fully"><div class="slideshow_b5 owl-carousel">';
     $buffy .= $this->inner($tt_query->posts);
     $buffy .= '</div></div></div>';
     return $buffy;
 }