Created
June 17, 2026 15:27
-
-
Save adamziel/d9faa03173a44115e560a78a756496eb to your computer and use it in GitHub Desktop.
Gutenberg PR 79000 #78989 Playground repro blueprint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://playground.wordpress.net/blueprint-schema.json", | |
| "landingPage": "/wp-admin/post.php?post=6401&action=edit", | |
| "meta": { | |
| "title": "PR 79000 passive Navigation dirty related entities test", | |
| "description": "Installs Gutenberg PR 79000, seeds the #78989 related-entity dirty repro, and lands in the seeded post editor.", | |
| "author": "adamziel" | |
| }, | |
| "preferredVersions": { | |
| "php": "8.4", | |
| "wp": "7.0" | |
| }, | |
| "login": true, | |
| "steps": [ | |
| { | |
| "step": "mkdir", | |
| "path": "/wordpress/pr" | |
| }, | |
| { | |
| "step": "writeFile", | |
| "path": "/wordpress/pr/pr.zip", | |
| "data": { | |
| "resource": "url", | |
| "url": "/plugin-proxy.php?org=WordPress&repo=gutenberg&workflow=Build%20Gutenberg%20Plugin%20Zip&artifact=gutenberg-plugin&pr=79000" | |
| }, | |
| "progress": { | |
| "weight": 2, | |
| "caption": "Applying Gutenberg PR 79000" | |
| } | |
| }, | |
| { | |
| "step": "unzip", | |
| "zipPath": "/wordpress/pr/pr.zip", | |
| "extractToPath": "/wordpress/pr" | |
| }, | |
| { | |
| "step": "installPlugin", | |
| "pluginZipFile": { | |
| "resource": "vfs", | |
| "path": "/wordpress/pr/gutenberg.zip" | |
| } | |
| }, | |
| { | |
| "step": "activateTheme", | |
| "themeFolderName": "twentytwentyfive" | |
| }, | |
| { | |
| "step": "runPHP", | |
| "code": "<?php\nrequire '/wordpress/wp-load.php';\n\nswitch_theme( 'twentytwentyfive' );\n\nforeach ( get_posts( array( 'post_type' => array( 'post', 'page', 'wp_template', 'wp_template_part', 'wp_navigation' ), 'post_status' => 'any', 'numberposts' => -1, 'fields' => 'ids' ) ) as $id ) {\n wp_delete_post( $id, true );\n}\n\nwp_insert_post( array( 'import_id' => 6001, 'post_type' => 'page', 'post_status' => 'publish', 'post_title' => 'Products', 'post_content' => '<!-- wp:paragraph --><p>Products.</p><!-- /wp:paragraph -->' ) );\nwp_insert_post( array( 'import_id' => 6002, 'post_type' => 'page', 'post_status' => 'publish', 'post_title' => 'Laptops', 'post_parent' => 6001, 'post_content' => '<!-- wp:paragraph --><p>Laptops.</p><!-- /wp:paragraph -->' ) );\n\nfunction repro_nav( $id, $title ) {\n wp_insert_post( array(\n 'import_id' => $id,\n 'post_type' => 'wp_navigation',\n 'post_status' => 'publish',\n 'post_title' => $title,\n // Stale value: when rendered outside a navigation-submenu, Page List will derive isNested=false.\n 'post_content' => '<!-- wp:page-list {\"isNested\":true} /-->',\n ) );\n}\n\nrepro_nav( 6101, 'Header' );\nrepro_nav( 6102, 'Navigation 6' );\nrepro_nav( 6103, 'Navigation 7' );\nrepro_nav( 6104, 'Navigation 8' );\nrepro_nav( 6105, 'Footer navigation' );\n\nfunction repro_part( $id, $slug, $title, $area, $content ) {\n wp_insert_post( array(\n 'import_id' => $id,\n 'post_type' => 'wp_template_part',\n 'post_status' => 'publish',\n 'post_name' => $slug,\n 'post_title' => $title,\n 'post_content' => $content,\n ) );\n wp_set_object_terms( $id, 'twentytwentyfive', 'wp_theme' );\n wp_set_object_terms( $id, $area, 'wp_template_part_area' );\n}\n\n$nav_block = function( $id ) {\n // Stale value: horizontal Navigation cannot keep submenuVisibility=\"always\" and rewrites it on render.\n return '<!-- wp:navigation {\"ref\":' . intval( $id ) . ',\"submenuVisibility\":\"always\",\"overlayMenu\":\"never\"} /-->';\n};\n\nrepro_part( 6201, 'header', 'Header', 'header', '<!-- wp:group --><div class=\"wp-block-group\"><!-- wp:paragraph --><p>Header text</p><!-- /wp:paragraph -->' . $nav_block( 6101 ) . $nav_block( 6102 ) . $nav_block( 6103 ) . '</div><!-- /wp:group -->' );\nrepro_part( 6202, 'newsletter-signup', 'newsletter signup', 'uncategorized', '<!-- wp:group --><div class=\"wp-block-group\"><!-- wp:paragraph --><p>newsletter signup</p><!-- /wp:paragraph -->' . $nav_block( 6104 ) . '</div><!-- /wp:group -->' );\nrepro_part( 6203, 'footer', 'Footer', 'footer', '<!-- wp:group --><div class=\"wp-block-group\"><!-- wp:paragraph --><p>Footer text</p><!-- /wp:paragraph -->' . $nav_block( 6105 ) . '</div><!-- /wp:group -->' );\n\n$template_content = '<!-- wp:template-part {\"slug\":\"header\",\"theme\":\"twentytwentyfive\",\"tagName\":\"header\"} /--><!-- wp:group --><div class=\"wp-block-group\"><!-- wp:post-title /--><!-- wp:post-content /--></div><!-- /wp:group --><!-- wp:template-part {\"slug\":\"newsletter-signup\",\"theme\":\"twentytwentyfive\"} /--><!-- wp:template-part {\"slug\":\"footer\",\"theme\":\"twentytwentyfive\",\"tagName\":\"footer\"} /-->';\nwp_insert_post( array( 'import_id' => 6301, 'post_type' => 'wp_template', 'post_status' => 'publish', 'post_name' => 'single', 'post_title' => 'Single Posts', 'post_content' => $template_content ) );\nwp_set_object_terms( 6301, 'twentytwentyfive', 'wp_theme' );\n\nwp_insert_post( array( 'import_id' => 6401, 'post_type' => 'post', 'post_status' => 'draft', 'post_title' => 'Eight related auto dirty draft', 'post_content' => '<!-- wp:paragraph --><p>Only this paragraph should change.</p><!-- /wp:paragraph -->' ) );\n" | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment