Skip to content

Commit 8761517

Browse files
committed
Set ALLOW_EXPERIMENT_REREGISTRATION to false in WebPack build.
Gutenberg introduced a system of sharing private APIs in WordPress/gutenberg#46131. One of the safeguards is a check preventing the same module from opting-in twice so that contributors cannot easily gain access by pretending to be a core module. That safeguard is only meant for WordPress core and not for the released `@wordpress` packages. However, right now it is opt-out and must be explicitly disabled by developers wanting to install the `@wordpress` packages. Let's make it opt-out instead. This commit opts-out from that check in WordPress core by setting the ALLOW_EXPERIMENT_REREGISTRATION to false. Once it's merged, the Gutenberg plugin should be adjusted to use `true` as the default value.
1 parent f80dfdf commit 8761517

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/blocks/template-part.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function render_block_core_template_part( $attributes ) {
2222
if (
2323
isset( $attributes['slug'] ) &&
2424
isset( $attributes['theme'] ) &&
25-
get_stylesheet() === $attributes['theme']
25+
wp_get_theme()->get_stylesheet() === $attributes['theme']
2626
) {
2727
$template_part_id = $attributes['theme'] . '//' . $attributes['slug'];
2828
$template_part_query = new WP_Query(

0 commit comments

Comments
 (0)