| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
// Heading-heavy homepage so the spec has stable text targets that |
| 5 |
// resolveTarget actually accepts. Paragraphs also resolve (detectBlockType |
| 6 |
// derives core/<X> from any wp-block-X class), but the existing |
| 7 |
// inline-text journey lives on headings; the trailing paragraph is kept |
| 8 |
// so paragraph-specific specs have a stable target. |
| 9 |
$content = "<!-- wp:heading -->\n" |
| 10 |
. "<h2 class=\"wp-block-heading\">First heading for inline-text testing.</h2>\n" |
| 11 |
. "<!-- /wp:heading -->\n\n" |
| 12 |
. "<!-- wp:heading -->\n" |
| 13 |
. "<h2 class=\"wp-block-heading\">Second heading for cancel testing.</h2>\n" |
| 14 |
. "<!-- /wp:heading -->\n\n" |
| 15 |
. "<!-- wp:heading -->\n" |
| 16 |
. "<h2 class=\"wp-block-heading\">Third heading for cmd-enter testing.</h2>\n" |
| 17 |
. "<!-- /wp:heading -->\n\n" |
| 18 |
. "<!-- wp:heading -->\n" |
| 19 |
. "<h2 class=\"wp-block-heading\">Fourth heading for undo testing.</h2>\n" |
| 20 |
. "<!-- /wp:heading -->\n\n" |
| 21 |
. "<!-- wp:paragraph -->\n" |
| 22 |
. "<p>Paragraphs only get Ask AI today, not Quick Edit.</p>\n" |
| 23 |
. "<!-- /wp:paragraph -->\n"; |
| 24 |
|
| 25 |
$pageId = wp_insert_post([ |
| 26 |
'post_type' => 'page', |
| 27 |
'post_status' => 'publish', |
| 28 |
'post_title' => 'QE Test Home', |
| 29 |
'post_content' => $content, |
| 30 |
]); |
| 31 |
|
| 32 |
update_option('show_on_front', 'page'); |
| 33 |
update_option('page_on_front', $pageId); |
| 34 |
|