Skip to:
Content

BuddyPress.org

Ticket #5721: 5721.patch

File 5721.patch, 1003 bytes (added by pro120, 11 years ago)

Remove page template fallback check

  • src/bp-core/bp-core-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    11381138                                }
    11391139                        }
    11401140                }
    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                 }
    11561141        }
    11571142
    11581143        return apply_filters( 'bp_is_current_component', $is_current_component, $component );