| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
// One tagged block is enough — the QE bundle only mounts (and only then |
| 5 |
// repositions the admin-bar toggle) when the page has taggable targets. |
| 6 |
$content = "<!-- wp:heading -->\n" |
| 7 |
. "<h2 class=\"wp-block-heading\">Heading for the topbar order spec.</h2>\n" |
| 8 |
. "<!-- /wp:heading -->\n"; |
| 9 |
|
| 10 |
$pageId = wp_insert_post([ |
| 11 |
'post_type' => 'page', |
| 12 |
'post_status' => 'publish', |
| 13 |
'post_title' => 'QE Topbar Toggle Order Home', |
| 14 |
'post_content' => $content, |
| 15 |
]); |
| 16 |
|
| 17 |
update_option('show_on_front', 'page'); |
| 18 |
update_option('page_on_front', $pageId); |
| 19 |
|