Making WordPress.org

Changeset 10604


Ignore:
Timestamp:
01/20/2021 05:31:04 AM (4 years ago)
Author:
dd32
Message:

Support: Add a 'All Replies' moderator view to see an overview all of current forum activity.

https://wordpress.org/support/view/all-replies/ compliments https://wordpress.org/support/view/all-topics/ however it doesn't exclude plugin/theme/review replies.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r10596 r10604  
    697697            bbp_is_single_topic() || bbp_is_single_reply() || bbp_is_search_results()
    698698        ||
    699             bbp_is_single_view() && in_array( bbp_get_view_id(), array( 'spam', 'pending', 'archived' ) )
     699            bbp_is_single_view() && in_array( bbp_get_view_id(), array( 'spam', 'pending', 'archived', 'all-replies' ) )
    700700        ) {
    701701            return $r;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php

    r7482 r10604  
    116116                ),
    117117                'post_status'   => 'archived',
     118                'show_stickies' => false,
     119                'orderby'       => 'ID',
     120            )
     121        );
     122
     123        bbp_register_view(
     124            'all-replies',
     125            __( 'All Replies', 'wporg-forums' ),
     126            array(
     127                'meta_key'      => null,
     128                'post_type'     => 'reply',
     129                'post_status'   => array(
     130                    'spam',
     131                    'pending',
     132                    'publish'
     133                ),
    118134                'show_stickies' => false,
    119135                'orderby'       => 'ID',
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php

    r10603 r10604  
    290290            }
    291291        }
     292
     293        if ( bbp_is_single_view() && 'all-replies' === bbp_get_view_id() ) {
     294            add_filter( 'posts_where', array( $this, 'posts_in_last_month' ) );
     295        }
     296
    292297        return $r;
    293298    }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-reply.php

    r9848 r10604  
    77 * @subpackage Theme
    88 */
     9
     10/*
     11 * Stub this in for this template, as bbPress not too smart sometimes.
     12 * On a "topic query" which is a reply query, it'll fail to return an ID.
     13 */
     14add_filter( 'bbp_get_reply_id', function( $reply_id, $passed_id ) {
     15    if ( ! $reply_id && ! $passed_id && bbp_is_reply( get_the_ID() ) ) {
     16        $reply_id = get_the_ID();
     17    }
     18
     19    return $reply_id;
     20}, 10, 2 );
    921
    1022if ( bbp_is_single_view() || bbp_is_search_results() || bbp_is_single_user_replies() ) : ?>
Note: See TracChangeset for help on using the changeset viewer.