Changeset 2914 for branches/plugin/bbp-includes/bbp-general-template.php
- Timestamp:
- 02/18/2011 10:16:22 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-general-template.php
r2905 r2914 47 47 global $wp_query, $bbp; 48 48 49 if ( is_singular( bbp_get_forum_post_type() ) ) 50 return true; 51 52 if ( isset( $wp_query->query_vars['post_type'] ) && bbp_get_forum_post_type() === $wp_query->query_vars['post_type'] ) 53 return true; 54 55 if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && bbp_get_forum_post_type() === $_GET['post_type'] ) 56 return true; 57 58 if ( !empty( $post_id ) && ( bbp_get_forum_post_type() == get_post_field( 'post_type', $post_id ) ) ) 49 if ( empty( $post_id ) ) { 50 51 if ( is_singular( bbp_get_forum_post_type() ) ) 52 return true; 53 54 if ( isset( $wp_query->query_vars['post_type'] ) && ( bbp_get_forum_post_type() === $wp_query->query_vars['post_type'] ) ) 55 return true; 56 57 if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && ( bbp_get_forum_post_type() === $_GET['post_type'] ) ) 58 return true; 59 60 } elseif ( !empty( $post_id ) && ( bbp_get_forum_post_type() == get_post_field( 'post_type', $post_id ) ) ) 59 61 return true; 60 62 … … 80 82 return false; 81 83 82 if ( is_singular( bbp_get_topic_post_type() ) ) 83 return true; 84 85 if ( isset( $wp_query->query_vars['post_type'] ) && bbp_get_topic_post_type() === $wp_query->query_vars['post_type'] ) 86 return true; 87 88 if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && bbp_get_topic_post_type() === $_GET['post_type'] ) 89 return true; 90 91 if ( !empty( $post_id ) && ( bbp_get_topic_post_type() == get_post_field( 'post_type', $post_id ) ) ) 84 if ( empty( $post_id ) ) { 85 86 if ( is_singular( bbp_get_topic_post_type() ) ) 87 return true; 88 89 if ( isset( $wp_query->query_vars['post_type'] ) && ( bbp_get_topic_post_type() === $wp_query->query_vars['post_type'] ) ) 90 return true; 91 92 if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && ( bbp_get_topic_post_type() === $_GET['post_type'] ) ) 93 return true; 94 95 } elseif ( !empty( $post_id ) && ( bbp_get_topic_post_type() == get_post_field( 'post_type', $post_id ) ) ) 92 96 return true; 93 97 … … 122 126 function bbp_is_topic_merge() { 123 127 124 if ( bbp_is_topic_edit() && !empty( $_GET['action'] ) && 'merge' == $_GET['action'])128 if ( bbp_is_topic_edit() && !empty( $_GET['action'] ) && ( 'merge' == $_GET['action'] ) ) 125 129 return true; 126 130 … … 138 142 function bbp_is_topic_split() { 139 143 140 if ( bbp_is_topic_edit() && !empty( $_GET['action'] ) && 'split' == $_GET['action'])144 if ( bbp_is_topic_edit() && !empty( $_GET['action'] ) && ( 'split' == $_GET['action'] ) ) 141 145 return true; 142 146 … … 162 166 return false; 163 167 164 if ( is_singular( bbp_get_reply_post_type() ) ) 165 return true; 166 167 if ( isset( $wp_query->query_vars['post_type'] ) && bbp_get_reply_post_type() === $wp_query->query_vars['post_type'] ) 168 return true; 169 170 if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && bbp_get_reply_post_type() === $_GET['post_type'] ) 171 return true; 172 173 if ( !empty( $post_id ) && ( bbp_get_reply_post_type() == get_post_field( 'post_type', $post_id ) ) ) 168 if ( empty( $post_id ) ) { 169 170 if ( is_singular( bbp_get_reply_post_type() ) ) 171 return true; 172 173 if ( isset( $wp_query->query_vars['post_type'] ) && ( bbp_get_reply_post_type() === $wp_query->query_vars['post_type'] ) ) 174 return true; 175 176 if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && ( bbp_get_reply_post_type() === $_GET['post_type'] ) ) 177 return true; 178 179 } elseif ( !empty( $post_id ) && ( bbp_get_reply_post_type() == get_post_field( 'post_type', $post_id ) ) ) 174 180 return true; 175 181 … … 188 194 global $wp_query; 189 195 190 if ( !empty( $wp_query->bbp_is_reply_edit ) && $wp_query->bbp_is_reply_edit == true)196 if ( !empty( $wp_query->bbp_is_reply_edit ) && ( true == $wp_query->bbp_is_reply_edit ) ) 191 197 return true; 192 198 … … 211 217 return false; 212 218 213 if ( !empty( $query_name_check ) && 'bbp_user_profile_favorites' != bbp_get_query_name() )219 if ( !empty( $query_name_check ) && ( 'bbp_user_profile_favorites' != bbp_get_query_name() ) ) 214 220 return false; 215 221 … … 234 240 return false; 235 241 236 if ( !empty( $query_name_check ) && 'bbp_user_profile_subscriptions' != bbp_get_query_name() )242 if ( !empty( $query_name_check ) && ( 'bbp_user_profile_subscriptions' != bbp_get_query_name() ) ) 237 243 return false; 238 244 … … 258 264 return false; 259 265 260 if ( !empty( $query_name_check ) && 'bbp_user_profile_topics_created' != bbp_get_query_name() )266 if ( !empty( $query_name_check ) && ( 'bbp_user_profile_topics_created' != bbp_get_query_name() ) ) 261 267 return false; 262 268 … … 292 298 global $wp_query; 293 299 294 if ( !empty( $wp_query->bbp_is_user_profile_page ) && $wp_query->bbp_is_user_profile_page == true)300 if ( !empty( $wp_query->bbp_is_user_profile_page ) && ( true == $wp_query->bbp_is_user_profile_page ) ) 295 301 return true; 296 302 … … 309 315 global $wp_query; 310 316 311 if ( !empty( $wp_query->bbp_is_user_profile_edit ) && $wp_query->bbp_is_user_profile_edit == true)317 if ( !empty( $wp_query->bbp_is_user_profile_edit ) && ( true == $wp_query->bbp_is_user_profile_edit ) ) 312 318 return true; 313 319 … … 326 332 global $wp_query; 327 333 328 if ( !empty( $wp_query->bbp_is_view ) && $wp_query->bbp_is_view == true)334 if ( !empty( $wp_query->bbp_is_view ) && ( true == $wp_query->bbp_is_view ) ) 329 335 return true; 330 336
Note: See TracChangeset
for help on using the changeset viewer.