From be82c8e9ae9c43683faaf82e1661ee34b4b736a0 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 24 Nov 2026 14:10:46 +1100 Subject: [PATCH 1/6] Update GB hash to cff1e7197dcafcefe2a5727f88a21f41c54dcbe7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 12a90c83b077b..b11f53c0d2a77 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "efd7722f89ebb8abfc3607fffdd86f5e34afbd9c", + "sha": "cff1e7197dcafcefe2a5727f88a21f41c54dcbe7", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { From f9dc633bc5dcdf2972810727fd47841c16830f70 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 24 Nov 2026 14:11:44 +1100 Subject: [PATCH 2/6] Update build for GB hash cff1e7197dcafcefe2a5727f88a21f41c54dcbe7 --- src/wp-includes/assets/script-loader-packages.php | 4 ++-- src/wp-includes/assets/script-modules-packages.php | 8 ++++---- src/wp-includes/build/scripts/core-fields/index.php | 4 ++-- .../core-fields/post_type_supports/parent/field.php | 6 +++--- src/wp-includes/images/icon-library/update.svg | 3 ++- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index e33f77b5f7755..1bac8cbc19131 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -151,7 +151,7 @@ 'import' => 'dynamic' ) ), - 'version' => '58156d96a4c9fdf86645' + 'version' => '9ad7f7e62e9fbecbab34' ), 'block-serialization-default-parser.js' => array( 'dependencies' => array( @@ -549,7 +549,7 @@ 'import' => 'static' ) ), - 'version' => '33deefc6545abe93022a' + 'version' => 'c1e50b340a6f2a32176c' ), 'element.js' => array( 'dependencies' => array( diff --git a/src/wp-includes/assets/script-modules-packages.php b/src/wp-includes/assets/script-modules-packages.php index a0560e1063778..9fcc01076e986 100644 --- a/src/wp-includes/assets/script-modules-packages.php +++ b/src/wp-includes/assets/script-modules-packages.php @@ -10,7 +10,7 @@ 'wp-data', 'wp-i18n' ), - 'version' => '9448bb3053516a39086d' + 'version' => '2dfc1cc1ffd6007eaacd' ), 'block-editor/utils/fit-text-frontend.js' => array( 'dependencies' => array( @@ -349,7 +349,7 @@ 'import' => 'static' ) ), - 'version' => '2aa2fe44937a04cb98c7' + 'version' => '5a1005804ad8a5083c79' ), 'core-fields/root_site.js' => array( 'dependencies' => array( @@ -466,7 +466,7 @@ 'dependencies' => array( ), - 'version' => 'b2185b9b3c06dcd1869d' + 'version' => '0c838873c424e941c437' ), 'interactivity-router/full-page.js' => array( 'dependencies' => array( @@ -494,7 +494,7 @@ 'import' => 'static' ) ), - 'version' => 'c0110eac0afb41d3f204' + 'version' => '4555574d1243e79178f5' ), 'latex-to-mathml/index.js' => array( 'dependencies' => array( diff --git a/src/wp-includes/build/scripts/core-fields/index.php b/src/wp-includes/build/scripts/core-fields/index.php index 8b4b10f88233e..8d9fdc42b6dd9 100644 --- a/src/wp-includes/build/scripts/core-fields/index.php +++ b/src/wp-includes/build/scripts/core-fields/index.php @@ -32,7 +32,7 @@ * - `last_edited_date`, for every post type. * - `notesCount`, for the post types whose `editor` support has the `notes` * argument. - * - `parent`, for the post types supporting `page-attributes`. + * - `parent`, for hierarchical post types supporting `page-attributes`. * - `password`, for every post type but the design ones. * - `ping_status`, for the post types supporting `trackbacks`. * - `post-content-info`, for the post types supporting `editor`. @@ -71,7 +71,7 @@ function wp_register_core_post_type_supports_fields() { 'format' => post_type_supports( $post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ), 'last_edited_date' => true, 'notesCount' => is_array( $editor ) && (bool) array_filter( array_column( $editor, 'notes' ) ), - 'parent' => post_type_supports( $post_type, 'page-attributes' ), + 'parent' => is_post_type_hierarchical( $post_type ) && post_type_supports( $post_type, 'page-attributes' ), 'password' => true, 'ping_status' => post_type_supports( $post_type, 'trackbacks' ), 'post-content-info' => post_type_supports( $post_type, 'editor' ), diff --git a/src/wp-includes/build/scripts/core-fields/post_type_supports/parent/field.php b/src/wp-includes/build/scripts/core-fields/post_type_supports/parent/field.php index d26460c976ad8..f3a04ab52ce2f 100644 --- a/src/wp-includes/build/scripts/core-fields/post_type_supports/parent/field.php +++ b/src/wp-includes/build/scripts/core-fields/post_type_supports/parent/field.php @@ -1,8 +1,8 @@ - + + From e45addfd5612cec7a32f4f31aeec83099c616291 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 24 Nov 2026 10:33:52 +0400 Subject: [PATCH 3/6] Tests: Backport parent field tests from PR 15290. Parent field now requires hierarchical post type. See https://github.com/WordPress/wordpress-develop/pull/15290. Co-Authored-By: Claude Opus 5.5 --- .../wpRegisterCoreFieldCollections.php | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/entity-fields/wpRegisterCoreFieldCollections.php b/tests/phpunit/tests/entity-fields/wpRegisterCoreFieldCollections.php index 6f9f4ab660089..6150def80e2ee 100644 --- a/tests/phpunit/tests/entity-fields/wpRegisterCoreFieldCollections.php +++ b/tests/phpunit/tests/entity-fields/wpRegisterCoreFieldCollections.php @@ -286,7 +286,6 @@ public static function data_default_fields_and_their_supports() { return array( 'discussion' => array( 'discussion', array( 'comments', 'trackbacks' ) ), 'excerpt' => array( 'excerpt', array( 'excerpt' ) ), - 'parent' => array( 'parent', array( 'page-attributes' ) ), 'ping_status' => array( 'ping_status', array( 'trackbacks' ) ), 'title' => array( 'title', array( 'title' ) ), 'post-content-info' => array( 'post-content-info', array( 'editor' ) ), @@ -318,6 +317,51 @@ public function test_a_default_field_follows_its_supports( $field_id, $supports $this->assertNotContains( $field_id, self::get_field_ids( 'test_without' ), 'A post type without the supports does not get the field.' ); } + /** + * Data provider. + * + * @return array[] Post type settings and expected parent field registration. + */ + public static function data_parent_field_requirements() { + return array( + 'hierarchical with attributes' => array( true, true, true ), + 'hierarchical without attributes' => array( true, false, false ), + 'non-hierarchical with attributes' => array( false, true, false ), + 'non-hierarchical without attributes' => array( false, false, false ), + ); + } + + /** + * The parent field requires both hierarchy and page attributes support. + * + * @ticket 66428 + * + * @dataProvider data_parent_field_requirements + * + * @param bool $hierarchical Whether the post type is hierarchical. + * @param bool $has_attributes Whether the post type supports page attributes. + * @param bool $has_parent Whether the parent field should be registered. + */ + public function test_the_parent_field_requires_hierarchy_and_page_attributes( $hierarchical, $has_attributes, $has_parent ) { + register_post_type( + 'test_parent', + array( + 'show_in_rest' => true, + 'hierarchical' => $hierarchical, + 'supports' => $has_attributes ? array( 'page-attributes' ) : array(), + ) + ); + + try { + self::reset_registry(); + $ids = self::get_field_ids( 'test_parent' ); + } finally { + unregister_post_type( 'test_parent' ); + } + + $this->assertSame( $has_parent, in_array( 'parent', $ids, true ) ); + } + /** * The default fields come from the `field.php` files of the * `post_type_supports` folder. From 64c8bab146c3357e38917c02eee37bdd0609a309 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 24 Nov 2026 11:29:19 +0400 Subject: [PATCH 4/6] Update GB hash to b18b2f8a858d789a81a05dedfe3e6025d6c45e11 Co-Authored-By: Claude Opus 5.5 --- package.json | 2 +- src/wp-includes/assets/script-loader-packages.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b11f53c0d2a77..d7fc3312ee540 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "cff1e7197dcafcefe2a5727f88a21f41c54dcbe7", + "sha": "b18b2f8a858d789a81a05dedfe3e6025d6c45e11", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index 1bac8cbc19131..d28f6f3b6b8a2 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -105,7 +105,7 @@ 'wp-url', 'wp-warning' ), - 'version' => 'f9a3114894c529a215ac' + 'version' => 'd7e8b053f06b2e948e70' ), 'block-library.js' => array( 'dependencies' => array( From 21b70f4eb3cefaf0a6ea38775ae357704c1b0f12 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 24 Nov 2026 12:03:17 +0400 Subject: [PATCH 5/6] Update GB hash to 9fa79e25d665e7a0d26ed618bd6234ca272088ae Co-Authored-By: Claude Opus 5.5 --- package.json | 2 +- src/wp-includes/assets/script-loader-packages.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d7fc3312ee540..69eb837b02522 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "b18b2f8a858d789a81a05dedfe3e6025d6c45e11", + "sha": "9fa79e25d665e7a0d26ed618bd6234ca272088ae", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index d28f6f3b6b8a2..8d1f904564c81 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -670,7 +670,7 @@ 'wp-url', 'wp-warning' ), - 'version' => 'd91937a9b82062da49eb' + 'version' => '5ef0448131de57454ed0' ), 'notices.js' => array( 'dependencies' => array( From 33c72259256338563d26c9a441010514447134b2 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 24 Nov 2026 12:33:44 +0400 Subject: [PATCH 6/6] Update GB hash to c5bdc7f4898ec98114cdccbe1cacec7a979b85cc Co-Authored-By: Claude Opus 5.5 --- package.json | 2 +- src/wp-includes/assets/script-loader-packages.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 69eb837b02522..4b51f22f896b2 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "9fa79e25d665e7a0d26ed618bd6234ca272088ae", + "sha": "c5bdc7f4898ec98114cdccbe1cacec7a979b85cc", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index 8d1f904564c81..dca8010311142 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -105,7 +105,7 @@ 'wp-url', 'wp-warning' ), - 'version' => 'd7e8b053f06b2e948e70' + 'version' => 'e21efcc5c30f26ee0aba' ), 'block-library.js' => array( 'dependencies' => array(