Changeset 13903 for trunk/src/bp-core/bp-core-template-loader.php
- Timestamp:
- 06/04/2024 02:30:49 AM (20 months ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-template-loader.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-template-loader.php
r13878 r13903 186 186 187 187 // Trim off any slashes from the template name. 188 $template_name = ltrim( $template_name, '/' );188 $template_name = ltrim( $template_name, '/' ); 189 189 190 190 // Loop through template stack. … … 253 253 254 254 // Set up data array. 255 $data = array();255 $data = array(); 256 256 $data['file'] = $data['uri'] = $located; 257 257 258 258 $find = array( 259 259 get_theme_root(), 260 bp_get_theme_compat_dir() 260 bp_get_theme_compat_dir(), 261 261 ); 262 262 263 263 $replace = array( 264 264 get_theme_root_uri(), 265 bp_get_theme_compat_url() 265 bp_get_theme_compat_url(), 266 266 ); 267 267 … … 340 340 341 341 // Setup some default variables. 342 $tag = 'bp_template_stack'; 343 $args = $stack = array(); 342 $tag = 'bp_template_stack'; 343 $args = array(); 344 $stack = array(); 344 345 345 346 // Add 'bp_template_stack' to the current filter array. … … 384 385 * @param array $stack Array of registered directories for template locations. 385 386 */ 386 return (array) apply_filters( 'bp_get_template_stack', $stack ) ;387 return (array) apply_filters( 'bp_get_template_stack', $stack ); 387 388 } 388 389 … … 397 398 * @param string $slug See {@link bp_get_template_part()}. 398 399 * @param string|null $name See {@link bp_get_template_part()}. 399 * @param bool $ echoIf true, template content will be echoed. If false,400 * @param bool $ret If true, template content will be echoed. If false, 400 401 * returned. Default: true. 401 402 * @param array $args See {@link bp_get_template_part()}. 402 403 * @return string|null If $echo, returns the template content. 403 404 */ 404 function bp_buffer_template_part( $slug, $name = null, $ echo= true, $args = array() ) {405 function bp_buffer_template_part( $slug, $name = null, $ret = true, $args = array() ) { 405 406 ob_start(); 406 407 … … 417 418 418 419 // Echo or return the output buffer contents. 419 if ( true === $ echo) {420 if ( true === $ret ) { 420 421 // phpcs:ignore WordPress.Security.EscapeOutput 421 422 echo $output; … … 500 501 'buddypress', 501 502 'community', 502 '' 503 '', 503 504 ); 504 505 … … 565 566 566 567 // Bail if filters are suppressed on this query. 567 if ( true == $posts_query->get( 'suppress_filters' ) ) {568 if ( true === $posts_query->get( 'suppress_filters' ) ) { 568 569 return; 569 570 } … … 831 832 */ 832 833 function bp_get_theme_compat_templates() { 833 return bp_get_query_template( 'buddypress', array( 834 'plugin-buddypress.php', 835 'buddypress.php', 836 'community.php', 837 'generic.php', 838 'page.php', 839 'single.php', 840 'singular.php', 841 'index.php' 842 ) ); 834 return bp_get_query_template( 835 'buddypress', 836 array( 837 'plugin-buddypress.php', 838 'buddypress.php', 839 'community.php', 840 'generic.php', 841 'page.php', 842 'single.php', 843 'singular.php', 844 'index.php', 845 ) 846 ); 843 847 } 844 848
Note: See TracChangeset
for help on using the changeset viewer.