Ticket #6444: bp-core-load-templates.patch
File bp-core-load-templates.patch, 2.2 KB (added by , 10 years ago) |
---|
-
src/bp-core/bp-core-catchuri.php
367 367 * bp_core_load_template( 'members/index' ); 368 368 * Loads: 369 369 * wp-content/themes/[activated_theme]/members/index.php 370 * or 371 * wp-content/themes/[activated_theme]/[buddypress or community]/members/index.php 370 372 * 371 373 * @param array $templates Array of templates to attempt to load. 372 374 * @return bool|null Returns false on failure. … … 391 393 $filtered_templates[] = $template . '.php'; 392 394 } 393 395 394 // Only perform template lookup for bp-default themes396 // Only perform template lookup for themes with the buddypress pages inside them 395 397 if ( ! bp_use_theme_compat_with_current_theme() ) { 396 $template = locate_template( (array) $filtered_templates, false );398 $template = bp_locate_template( (array) $filtered_templates, false ); 397 399 398 400 // Theme compat doesn't require a template lookup 399 401 } else { -
src/bp-core/bp-core-theme-compatibility.php
310 310 * not been updated for BP 1.7+; we make the assumption that any theme in 311 311 * this category will have the members-loop.php template, and so use its 312 312 * presence as an indicator that theme compatibility is not required 313 * 313 * 4) A legacy template is found at buddypress/members/members-loop.php or at buddypress/members/members-loop.php 314 314 * @since BuddyPress (1.9.0) 315 315 * 316 316 * @return bool True if the current theme needs theme compatibility. … … 337 337 // Examples are clones of bp-default 338 338 } elseif ( locate_template( 'members/members-loop.php', false, false ) ) { 339 339 $theme_compat = false; 340 341 // For themes using the guidelines from https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/#overloading-template-compatibility-theme-files 342 } elseif ( bp_locate_template( 'members/members-loop.php', false, false ) ) { 343 $theme_compat = false; 340 344 } 341 345 } 342 346