Skip to:
Content

BuddyPress.org

Ticket #7115: 7115.bp-default.patch

File 7115.bp-default.patch, 810 bytes (added by r-a-y, 3 years ago)
  • src/bp-core/bp-core-catchuri.php

     
    456456         * @param array  $filtered_templates Array of templates to attempt to load.
    457457         */
    458458        $located_template = apply_filters( 'bp_located_template', $template, $filtered_templates );
     459
     460        /*
     461         * If current page is an embed, wipe out bp-default template.
     462         *
     463         * Wiping out the bp-default template allows WordPress to use their special
     464         * embed template, which is what we want.
     465         */
     466        if ( function_exists( 'is_embed' ) && is_embed() ) {
     467                $located_template = '';
     468        }
     469
    459470        if ( !empty( $located_template ) ) {
    460471                // Template was located, lets set this as a valid page and not a 404.
    461472                status_header( 200 );