IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 1138 | 1138 | } |
| 1139 | 1139 | } |
| 1140 | 1140 | } |
| 1141 | | |
| 1142 | | // Page template fallback check if $bp->current_component is empty |
| 1143 | | } elseif ( !is_admin() && is_a( $wp_query, 'WP_Query' ) && is_page() ) { |
| 1144 | | global $wp_query; |
| 1145 | | |
| 1146 | | $page = $wp_query->get_queried_object(); |
| 1147 | | if ( isset( $page->ID ) ) { |
| 1148 | | $custom_fields = get_post_custom_values( '_wp_page_template', $page->ID ); |
| 1149 | | $page_template = $custom_fields[0]; |
| 1150 | | |
| 1151 | | // Component name is in the page template name |
| 1152 | | if ( !empty( $page_template ) && strstr( strtolower( $page_template ), strtolower( $component ) ) ) { |
| 1153 | | $is_current_component = true; |
| 1154 | | } |
| 1155 | | } |
| 1156 | 1141 | } |
| 1157 | 1142 | |
| 1158 | 1143 | return apply_filters( 'bp_is_current_component', $is_current_component, $component ); |