Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/21/2015 07:31:58 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Introduce bp_theme_compat_page_templates() for determining if a directory page template is available as an override for the theme compatibility template hierarchy.

This fixes a fatal PHP error when the results of get_page_template_slug() do not match an available template for the currently active parent or child themes, causing that directory page to have no fallback template (and consequently template_include to receive an empty array.)

Fixes #6065.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-filters.php

    r9351 r9389  
    6464
    6565// Filter BuddyPress template locations
    66 add_filter( 'bp_get_template_stack', 'bp_add_template_stack_locations'          );
     66add_filter( 'bp_get_template_stack', 'bp_add_template_stack_locations' );
     67
     68// Filter BuddyPress template hierarchy and look for page templates
     69add_filter( 'bp_get_buddypress_template', 'bp_theme_compat_page_templates' );
    6770
    6871// Turn comments off for BuddyPress pages
Note: See TracChangeset for help on using the changeset viewer.