Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * uses module 11
- * Class td_block_12
- */
- class td_block_12 extends td_block {
- function render($atts, $content = null){
- parent::render($atts); // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
- $buffy = ''; //output buffer
- //get the js for this block
- $buffy .= $this->get_block_js();
- $buffy .= '<div class="' . $this->get_block_classes() . '">';
- //get the block title
- $buffy .= $this->get_block_title();
- //get the sub category filter for this block
- $buffy .= $this->get_pull_down_filter();
- $buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
- $buffy .= $this->inner($this->td_query->posts); //inner content of the block
- $buffy .= '</div>';
- //get the ajax pagination for this block
- $buffy .= $this->get_block_pagination();
- $buffy .= '</div> <!-- ./block -->';
- return $buffy;
- }
- function inner($posts, $td_column_number = '') {
- $buffy = '';
- $td_block_layout = new td_block_layout();
- $countModules = 0;
- if (!empty($posts)) {
- foreach ($posts as $post) {
- $td_module_11 = new td_module_11($post);
- $buffy .= $td_block_layout->open12(); //added in 010 theme - span 12 doesn't use rows
- $buffy .= $td_module_11->render($post);
- $buffy .= $td_block_layout->close12();
- $countModules++;
- if ($countModules == 5) {
- $buffy .= $td_block_layout->open12();
- $buffy .= td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'custom_ad_1'));
- $buffy .= $td_block_layout->close12();
- }
- }
- }
- $buffy .= $td_block_layout->close_all_tags();
- return $buffy;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement