Changeset 5049
- Timestamp:
- 03/02/2017 11:29:27 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support
- Files:
-
- 3 edited
-
bbpress/loop-single-topic.php (modified) (1 diff)
-
functions.php (modified) (2 diffs)
-
sidebar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-topic.php
r5021 r5049 51 51 <?php do_action( 'bbp_theme_after_topic_started_by' ); ?> 52 52 53 <?php if ( ( bbp_is_single_view() && ! in_array( bbp_get_view_id(), array( 'plugin', 'theme', 'reviews', 'active' )) ) || ( bbp_is_single_forum() && bbp_get_topic_forum_id() != bbp_get_forum_id() ) || bbp_is_single_user_topics() ) : ?>53 <?php if ( ( bbp_is_single_view() && ! wporg_support_is_compat_view() ) || ( bbp_is_single_forum() && bbp_get_topic_forum_id() != bbp_get_forum_id() ) || bbp_is_single_user_topics() ) : ?> 54 54 55 55 <?php do_action( 'bbp_theme_before_topic_started_in' ); ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
r5007 r5049 216 216 /** 217 217 * Check if the current page is a single review. 218 * 219 * @bool True if the current page is a single review, false otherwise. 218 220 */ 219 221 function wporg_support_is_single_review() { … … 223 225 224 226 return ( WordPressdotorg\Forums\Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id() ); 227 } 228 229 /** 230 * Get the list of plugin- and theme-specific views. 231 * 232 * @return array Array of compat views. 233 */ 234 function wporg_support_get_compat_views() { 235 return array( 'theme', 'plugin', 'reviews', 'active' ); 236 } 237 238 /** 239 * Check if the current page is a plugin- or theme-specific view. 240 * 241 * @param string $view_id View ID to check. 242 * @return bool True if the current page is a compat view, false otherwise. 243 */ 244 function wporg_support_is_compat_view( $view_id = 0 ) { 245 if ( ! bbp_is_single_view() ) { 246 return false; 247 } 248 249 $view_id = bbp_get_view_id( $view_id ); 250 251 return in_array( $view_id, wporg_support_get_compat_views() ); 225 252 } 226 253 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/sidebar.php
r4969 r5049 36 36 </div> 37 37 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() ) : ?> 39 39 40 40 <?php do_action( 'wporg_compat_view_sidebar' ); ?> … … 109 109 110 110 <?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() ) ) { 112 112 continue; 113 113 } … … 123 123 <?php endif; ?> 124 124 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' ) ) : ?> 126 126 127 127 <div>
Note: See TracChangeset
for help on using the changeset viewer.