Changeset 62005 for branches/4.8/src/wp-includes/template-loader.php
- Timestamp:
- 03/13/2026 01:03:05 PM (6 months ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/template-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/trunk merged: 61879-61884,61886-61887,61890,61913
- Property svn:mergeinfo changed
-
branches/4.8/src/wp-includes/template-loader.php
r38755 r62005 71 71 * @param string $template The path of the template to include. 72 72 */ 73 if ( $template = apply_filters( 'template_include', $template ) ) { 74 include( $template ); 73 $template = apply_filters( 'template_include', $template ); 74 $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) ); 75 $template = $is_stringy ? realpath( (string) $template ) : null; 76 if ( 77 is_string( $template ) && 78 ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) && 79 is_file( $template ) && 80 is_readable( $template ) 81 ) { 82 include $template; 75 83 } elseif ( current_user_can( 'switch_themes' ) ) { 76 84 $theme = wp_get_theme();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)