| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
// Keyboard reach of Ask AI on Ask-AI-only blocks. |
| 5 |
// - Top-level group: tagged by TagBlocks (depth-1, not in $ignored) but |
| 6 |
// absent from QUICK_EDIT_BLOCK_TYPES, so it surfaces ONLY Ask AI. This |
| 7 |
// is the block the keyboard previously could not act on. |
| 8 |
// - Inner heading: quick-editable + AI-eligible — proves the keyboard |
| 9 |
// contract only changed for the Ask-AI-only container, not its editable |
| 10 |
// children. |
| 11 |
$content = "<!-- wp:group {\"layout\":{\"type\":\"constrained\"}} -->\n" |
| 12 |
. "<div class=\"wp-block-group\"><!-- wp:heading -->\n" |
| 13 |
. "<h2 class=\"wp-block-heading\">Ask AI only group heading.</h2>\n" |
| 14 |
. "<!-- /wp:heading --></div>\n" |
| 15 |
. "<!-- /wp:group -->\n"; |
| 16 |
|
| 17 |
$pageId = wp_insert_post([ |
| 18 |
'post_type' => 'page', |
| 19 |
'post_status' => 'publish', |
| 20 |
'post_title' => 'QE Keyboard Ask AI Home', |
| 21 |
'post_content' => $content, |
| 22 |
]); |
| 23 |
|
| 24 |
update_option('show_on_front', 'page'); |
| 25 |
update_option('page_on_front', $pageId); |
| 26 |
|