| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
// Cursor-rule seed: a tagged paragraph with an inline link |
| 5 |
// (crosshair on text, pointer on the anchor), a search block (form |
| 6 |
// control branch), and a sibling page so the "edit mode off" assertion |
| 7 |
// has a real URL to land on with the same shape. |
| 8 |
$homeContent = "<!-- wp:paragraph -->\n" |
| 9 |
. "<p>Cursor rule paragraph with an <a href=\"/about/\">inline link</a> inside.</p>\n" |
| 10 |
. "<!-- /wp:paragraph -->\n\n" |
| 11 |
. "<!-- wp:search {\"label\":\"Search\",\"buttonText\":\"Go\"} /-->\n"; |
| 12 |
|
| 13 |
$pageId = wp_insert_post([ |
| 14 |
'post_type' => 'page', |
| 15 |
'post_status' => 'publish', |
| 16 |
'post_title' => 'QE Cursor Rule Home', |
| 17 |
'post_content' => $homeContent, |
| 18 |
]); |
| 19 |
|
| 20 |
wp_insert_post([ |
| 21 |
'post_type' => 'page', |
| 22 |
'post_status' => 'publish', |
| 23 |
'post_title' => 'About', |
| 24 |
'post_content' => "<!-- wp:heading --><h2 class=\"wp-block-heading\">About page reached.</h2><!-- /wp:heading -->\n", |
| 25 |
]); |
| 26 |
|
| 27 |
update_option('show_on_front', 'page'); |
| 28 |
update_option('page_on_front', $pageId); |
| 29 |
|