WordPress.org

Making WordPress.org

Changeset 4955


Ignore:
Timestamp:
02/20/2017 09:29:40 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Display Views menu in single forums, plugin- and theme-specific views, and single topics to ensure consistent navigation.

Feeds menu and tag cloud are only displayed in single views (excluding plugin- and theme-specific views) and tag archives, as before.

Fixes #1873.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sidebar.php

    r4872 r4955  
    8888            <?php endif; ?>
    8989
    90         <?php elseif ( ! bbp_is_single_user() ) : ?>
     90        <?php elseif ( is_tax( 'topic-tag' ) ) : ?>
    9191
    9292            <?php
    9393                $term_subscription = '';
    94                 if ( is_tax( 'topic-tag' ) && function_exists( 'WordPressdotorg\Forums\Term_Subscription\get_subscription_link' ) ) {
     94                if ( function_exists( 'WordPressdotorg\Forums\Term_Subscription\get_subscription_link' ) ) {
    9595                    $term_subscription = WordPressdotorg\Forums\Term_Subscription\get_subscription_link( get_queried_object()->term_id );
    9696                }
     
    9999                }
    100100            ?>
     101
     102        <?php endif; ?>
     103
     104        <?php if ( ! bbp_is_single_user() ) : ?>
     105
    101106            <div>
    102107                <h4><?php _e( 'Views', 'wporg-forums' ); ?></h4>
    103108                <ul class="topic-views">
    104109
    105                     <?php foreach ( bbp_get_views() as $view => $args ) : ?>
     110                    <?php foreach ( bbp_get_views() as $view => $args ) :
     111                        if ( in_array( $view, array( 'theme', 'plugin', 'reviews', 'active' ) ) ) {
     112                            continue;
     113                        }
     114                        ?>
    106115
    107116                        <li><a class="bbp-view-title" href="<?php bbp_view_url( $view ); ?>"><?php bbp_view_title( $view ); ?></a></li>
     
    111120                </ul>
    112121            </div>
     122
     123        <?php endif; ?>
     124
     125        <?php if ( bbp_is_single_view() && ! in_array( bbp_get_view_id(), array( 'theme', 'plugin', 'reviews', 'active' ) ) || is_tax( 'topic-tag' ) ) : ?>
    113126
    114127            <div>
Note: See TracChangeset for help on using the changeset viewer.