Actualizacion 7.1.2

This commit is contained in:
2026-09-25 12:02:42 -06:00
parent fa60d1f364
commit 32351c9497
221 changed files with 19735 additions and 6951 deletions
+14 -3
View File
@@ -343,11 +343,22 @@ function _get_block_template_file( $template_type, $slug ) {
);
foreach ( $themes as $theme_slug => $theme_dir ) {
$template_base_paths = get_block_theme_folders( $theme_slug );
$file_path = $theme_dir . '/' . $template_base_paths[ $template_type ] . '/' . $slug . '.html';
if ( file_exists( $file_path ) ) {
$template_dir = $theme_dir . '/' . $template_base_paths[ $template_type ];
$file_path = $template_dir . '/' . $slug . '.html';
$template_file = realpath( $file_path );
$template_root = realpath( $template_dir );
if (
false !== $template_file &&
false !== $template_root &&
str_starts_with(
wp_normalize_path( $template_file ),
trailingslashit( wp_normalize_path( $template_root ) )
)
) {
$new_template_item = array(
'slug' => $slug,
'path' => $file_path,
'path' => $template_file,
'theme' => $theme_slug,
'type' => $template_type,
);