| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
// Headings (which keyboard-entry.js leaves without role="button") are the |
| 5 |
// canonical repro shape — Chrome's :focus-visible heuristic paints the |
| 6 |
// default outline on a focused tabindex=0 heading even on mouse click, so |
| 7 |
// they're the regression-prone case to pin. |
| 8 |
$homeContent = "<!-- wp:heading -->\n" |
| 9 |
. "<h2 class=\"wp-block-heading\">Sticky selection heading.</h2>\n" |
| 10 |
. "<!-- /wp:heading -->\n\n" |
| 11 |
. "<!-- wp:paragraph -->\n" |
| 12 |
. "<p>A paragraph below the heading for the outside-click case.</p>\n" |
| 13 |
. "<!-- /wp:paragraph -->\n"; |
| 14 |
|
| 15 |
$pageId = wp_insert_post([ |
| 16 |
'post_type' => 'page', |
| 17 |
'post_status' => 'publish', |
| 18 |
'post_title' => 'QE Sticky Selection Home', |
| 19 |
'post_content' => $homeContent, |
| 20 |
]); |
| 21 |
|
| 22 |
update_option('show_on_front', 'page'); |
| 23 |
update_option('page_on_front', $pageId); |
| 24 |
|