Skip to content

Commit fb7caae

Browse files
Merge branch 'trunk' into skip-page-builder-dip
2 parents 2f0421f + e0054c7 commit fb7caae

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/wp-includes/class-wp-block-patterns-registry.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ private function get_content( $pattern_name, $outside_init_only = false ) {
174174
$patterns = &$this->registered_patterns;
175175
}
176176

177-
$pattern_path = realpath( $patterns[ $pattern_name ]['filePath'] ?? '' );
177+
$file_path = $patterns[ $pattern_name ]['filePath'] ?? '';
178+
$is_stringy = is_string( $file_path ) || ( is_object( $file_path ) && method_exists( $file_path, '__toString' ) );
179+
$pattern_path = $is_stringy ? realpath( (string) $file_path ) : null;
178180
if (
179181
! isset( $patterns[ $pattern_name ]['content'] ) &&
180182
is_string( $pattern_path ) &&

src/wp-includes/template-loader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@
111111
*
112112
* @param string $template The path of the template to include.
113113
*/
114-
$template = apply_filters( 'template_include', $template );
115-
$template = is_string( $template ) ? realpath( $template ) : null;
114+
$template = apply_filters( 'template_include', $template );
115+
$is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
116+
$template = $is_stringy ? realpath( (string) $template ) : null;
116117
if (
117118
is_string( $template ) &&
118119
( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&

src/wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '7.0-beta3-61849-src';
19+
$wp_version = '7.0-beta4-src';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)