Advertisement
Guest User

Untitled

a guest
Sep 11th, 2015
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <?php
  2.  
  3. class td_block_10 extends td_block {
  4.  
  5. function render($atts, $content = null) {
  6. parent::render($atts); // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
  7.  
  8. $buffy = '';
  9. $buffy .= $this->get_block_js();
  10.  
  11. $buffy .= '<div class="' . $this->get_block_classes() . '">';
  12.  
  13. //get the block title
  14. $buffy .= $this->get_block_title();
  15.  
  16. //get the sub category filter for this block
  17. $buffy .= $this->get_pull_down_filter();
  18.  
  19. $buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
  20. $buffy .= $this->inner($this->td_query->posts); //inner content of the block
  21. $buffy .= '</div>';
  22.  
  23. //get the ajax pagination for this block
  24. $buffy .= $this->get_block_pagination();
  25. $buffy .= '</div> <!-- ./block -->';
  26.  
  27. return $buffy;
  28. }
  29.  
  30. function inner($posts, $td_column_number = '') {
  31.  
  32. $buffy = '';
  33. $td_block_layout = new td_block_layout();
  34.  
  35. if (!empty($posts)) {
  36. foreach ($posts as $post) {
  37. $td_module_9 = new td_module_9($post);
  38.  
  39. $buffy .= $td_block_layout->open12(); //added in 010 theme - span 12 doesn't use rows
  40. $buffy .= $td_module_9->render($post);
  41. $buffy .= $td_block_layout->close12();
  42. }
  43. }
  44. $buffy .= $td_block_layout->close_all_tags();
  45. return $buffy;
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement