[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-forums/bbpress/ -> view.php (source)

   1  <?php
   2  require_once ('./bb-load.php');
   3  
   4  bb_repermalink();
   5  
   6  $view = bb_slug_sanitize($view);
   7  
   8  $sticky_count = $topic_count = 0;
   9  $stickies = $topics = $view_count = false;
  10  
  11  if ( isset($bb_views[$view]) ) {
  12      if ( $bb_views[$view]['sticky'] ) {
  13          $sticky_query = bb_view_query( $view, array('sticky' => '-no') ); // -no = yes
  14          $stickies     = $sticky_query->results;
  15          $sticky_count = $sticky_query->found_rows;
  16      }
  17      $topic_query = bb_view_query( $view, array('count' => true) );
  18      $topics      = $topic_query->results;
  19      $topic_count = $topic_query->found_rows;
  20  
  21      $view_count = max($sticky_count, $topic_count);
  22  }
  23  
  24  do_action( 'bb_custom_view', $view, $page );
  25  
  26  bb_load_template( 'view.php', array('view_count', 'stickies'), $view );
  27  
  28  ?>


Generated: Thu Dec 7 01:01:35 2017 Cross-referenced by PHPXref 0.7.1