Making WordPress.org

Changeset 4233


Ignore:
Timestamp:
10/13/2016 11:26:24 PM (7 years ago)
Author:
coffee2code
Message:

Forums Theme: Append '?view=all' to context forum and topic links for posts listed in moderator views (e.g. spam/pending/archived).

Fixes #2134.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress/loop-posts.php

    r4226 r4233  
    77 * @subpackage Theme
    88 */
     9
     10$is_moderator_view = class_exists( '\WordPressdotorg\Forums\Moderators' )
     11                && defined( '\WordPressdotorg\Forums\Moderators::VIEWS' )
     12                && in_array( bbp_get_view_id(), \WordPressdotorg\Forums\Moderators::VIEWS );
     13$view_all = $is_moderator_view ? '?view=all' : '';
    914
    1015?>
     
    2126                            <span class="bbp-header">
    2227                                <?php esc_html_e( 'Forum:', 'wporg-forums' ); ?>
    23                                 <a class="bbp-forum-permalink" href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?></a><br>
     28                                <a class="bbp-forum-permalink" href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); echo $view_all; ?>"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?></a><br>
    2429                                <?php esc_html_e( 'As the topic:', 'wporg-forums' ); ?>
    2530                                <?php bbp_topic_title( bbp_get_topic_id() ); ?>
     
    3742                            <span class="bbp-header">
    3843                                <?php esc_html_e( 'Forum:', 'wporg-forums' ); ?>
    39                                 <a class="bbp-forum-permalink" href="<?php bbp_forum_permalink( bbp_get_reply_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_reply_forum_id() ); ?></a><br>
     44                                <a class="bbp-forum-permalink" href="<?php bbp_forum_permalink( bbp_get_reply_forum_id() ); echo $view_all; ?>"><?php bbp_forum_title( bbp_get_reply_forum_id() ); ?></a><br>
    4045                                <?php esc_html_e( 'In reply to:', 'wporg-forums' ); ?>
    41                                 <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
     46                                <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); echo $view_all; ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
    4247                            </span>
    4348                    </div><!-- .bbp-meta -->
Note: See TracChangeset for help on using the changeset viewer.