Changeset 62001 for branches/5.2/src/wp-includes/template-loader.php
- Timestamp:
- 03/13/2026 12:29:20 PM (2 weeks ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/template-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/trunk merged: 61879-61884,61886-61887,61890,61913
- Property svn:mergeinfo changed
-
branches/5.2/src/wp-includes/template-loader.php
r44966 r62001 75 75 * @param string $template The path of the template to include. 76 76 */ 77 if ( $template = apply_filters( 'template_include', $template ) ) { 78 include( $template ); 77 $template = apply_filters( 'template_include', $template ); 78 $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) ); 79 $template = $is_stringy ? realpath( (string) $template ) : null; 80 if ( 81 is_string( $template ) && 82 ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) && 83 is_file( $template ) && 84 is_readable( $template ) 85 ) { 86 include $template; 79 87 } elseif ( current_user_can( 'switch_themes' ) ) { 80 88 $theme = wp_get_theme();
Note: See TracChangeset
for help on using the changeset viewer.