Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backport-changelog/6.9/10425.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
https://github.com/WordPress/wordpress-develop/pull/10425
10425

* https://github.com/WordPress/gutenberg/pull/72700
* https://github.com/WordPress/gutenberg/pull/72674
* https://github.com/WordPress/gutenberg/pull/72636
* https://github.com/WordPress/gutenberg/pull/72729
3 changes: 0 additions & 3 deletions backport-changelog/6.9/8063.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ https://github.com/WordPress/wordpress-develop/pull/8063
* https://github.com/WordPress/gutenberg/pull/72141
* https://github.com/WordPress/gutenberg/pull/72223
* https://github.com/WordPress/gutenberg/pull/72285
* https://github.com/WordPress/gutenberg/pull/72700
* https://github.com/WordPress/gutenberg/pull/72674
* https://github.com/WordPress/gutenberg/pull/72636
6 changes: 3 additions & 3 deletions lib/compat/wordpress-6.9/template-activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ function gutenberg_resolve_block_template( $template_type, $template_hierarchy,
// START CORE MODIFICATIONS //
//////////////////////////////

$object = get_queried_object();
$specific_template = $object ? get_page_template_slug( $object ) : null;
$object_id = get_queried_object_id();
$specific_template = $object_id ? get_page_template_slug( $object_id ) : null;
$active_templates = (array) get_option( 'active_templates', array() );

// We expect one template for each slug. Use the active template if it is
Expand Down Expand Up @@ -314,7 +314,7 @@ function ( $template ) {
);
$templates = array_merge( $templates, gutenberg_get_registered_block_templates( $query ) );

if ( $specific_template ) {
if ( $specific_template && in_array( $specific_template, $remaining_slugs, true ) ) {
$templates = array_merge( $templates, get_block_templates( array( 'slug__in' => array( $specific_template ) ) ) );
}

Expand Down
Loading