Making WordPress.org


Ignore:
Timestamp:
03/02/2017 11:29:27 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Introduce wporg_support_get_compat_views() and wporg_support_is_compat_view() to DRY some conditionals.

File:
1 edited

Legend:

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

    r4969 r5049  
    3636            </div>
    3737
    38         <?php elseif ( bbp_is_single_view() && in_array( bbp_get_view_id(), array( 'theme', 'plugin', 'reviews', 'active' ) ) ) : ?>
     38        <?php elseif ( wporg_support_is_compat_view() ) : ?>
    3939
    4040            <?php do_action( 'wporg_compat_view_sidebar' ); ?>
     
    109109
    110110                    <?php foreach ( bbp_get_views() as $view => $args ) :
    111                         if ( in_array( $view, array( 'theme', 'plugin', 'reviews', 'active' ) ) ) {
     111                        if ( in_array( $view, wporg_support_get_compat_views() ) ) {
    112112                            continue;
    113113                        }
     
    123123        <?php endif; ?>
    124124
    125         <?php if ( bbp_is_single_view() && ! in_array( bbp_get_view_id(), array( 'theme', 'plugin', 'reviews', 'active' ) ) || is_tax( 'topic-tag' ) ) : ?>
     125        <?php if ( bbp_is_single_view() && ! wporg_support_is_compat_view() || is_tax( 'topic-tag' ) ) : ?>
    126126
    127127            <div>
Note: See TracChangeset for help on using the changeset viewer.