Changeset 13686 for trunk/src/bp-core/bp-core-catchuri.php
- Timestamp:
- 01/01/2024 10:56:10 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-catchuri.php
r13522 r13686 70 70 * 71 71 * @since 1.0.0 72 * @since 14.0.0 Uses `locate_block_template()` to support BuddyPress Block only Themes. 72 73 * 73 74 * @param array $templates Array of templates to attempt to load. … … 95 96 // Only perform template lookup for bp-default themes. 96 97 if ( ! bp_use_theme_compat_with_current_theme() ) { 97 $template = locate_template( (array) $filtered_templates, false ); 98 if ( bp_theme_compat_is_block_theme() ) { 99 // Prevent BuddyPress components from using the BP Theme Compat feature. 100 remove_all_actions( 'bp_setup_theme_compat' ); 101 102 $block_templates = array(); 103 foreach ( (array) $templates as $template ) { 104 $block_templates[] = 'buddypress/' . $template; 105 } 106 107 $template_type = 'buddypress'; 108 $block_templates[] = $template_type; 109 110 $template = locate_block_template( '', $template_type, $block_templates ); 111 112 } else { 113 $template = locate_template( (array) $filtered_templates, false ); 114 } 98 115 99 116 // Theme compat doesn't require a template lookup. … … 124 141 } 125 142 126 if ( ! empty( $located_template ) ) {143 if ( ! empty( $located_template ) ) { 127 144 // Template was located, lets set this as a valid page and not a 404. 128 145 status_header( 200 );
Note: See TracChangeset
for help on using the changeset viewer.