Skip to content

Commit 4b4cc4f

Browse files
committed
backport removing deactivation
1 parent 87a20a8 commit 4b4cc4f

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/wp-includes/block-template-utils.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,8 +1358,6 @@ function get_block_template( $id, $template_type = 'wp_template' ) {
13581358
return $template;
13591359
}
13601360
}
1361-
} elseif ( false === $active_templates[ $slug ] ) {
1362-
return null;
13631361
}
13641362
}
13651363

src/wp-includes/block-template.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,6 @@ function resolve_block_template( $template_type, $template_hierarchy, $fallback_
168168
$specific_template = $object ? get_page_template_slug( $object ) : null;
169169
$active_templates = (array) get_option( 'active_templates', array() );
170170

171-
// Remove templates slugs that are deactivated, except if it's the specific
172-
// template or index.
173-
$slugs = array_filter(
174-
$slugs,
175-
function ( $slug ) use ( $specific_template, $active_templates ) {
176-
$should_ignore = $slug === $specific_template || 'index' === $slug;
177-
return $should_ignore || ( ! isset( $active_templates[ $slug ] ) || false !== $active_templates[ $slug ] );
178-
}
179-
);
180-
181171
// We expect one template for each slug. Use the active template if it is
182172
// set and exists. Otherwise use the static template.
183173
$templates = array();

0 commit comments

Comments
 (0)