Skip to:
Content

bbPress.org

Changeset 4803 for trunk/bbpress.php


Ignore:
Timestamp:
03/15/2013 08:27:41 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Add topic-view for popular topics, and use it in page-forum-statistics.php rather than hardcoded query.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbpress.php

    r4799 r4803  
    798798    public static function register_views() {
    799799
     800        // Popular topics
     801        bbp_register_view(
     802            'popular',
     803            __( 'Most popular topics', 'bbpress' ),
     804            apply_filters( 'bbp_register_view_popular', array(
     805                'meta_key'      => '_bbp_reply_count',
     806                'max_num_pages' => 1,
     807                'orderby'       => 'meta_value_num',
     808                'show_stickies' => false
     809            )
     810        ) );
     811
    800812        // Topics with no replies
    801813        bbp_register_view(
     
    803815            __( 'Topics with no replies', 'bbpress' ),
    804816            apply_filters( 'bbp_register_view_no_replies', array(
    805                 'meta_key'     => '_bbp_reply_count',
    806                 'meta_value'   => 1,
    807                 'meta_compare' => '<',
    808                 'orderby'      => ''
     817                'meta_key'      => '_bbp_reply_count',
     818                'meta_value'    => 1,
     819                'meta_compare'  => '<',
     820                'orderby'       => '',
     821                'show_stickies' => false
    809822            )
    810823        ) );
Note: See TracChangeset for help on using the changeset viewer.