Changeset 5049 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
- Timestamp:
- 03/02/2017 11:29:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.