PluginProbe
Extendify / 3.1.1
Extendify v3.1.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / tests / playwright / QuickEdit / keyboard-ask-ai / setup.php

setup.php in Extendify 3.1.1, at tests/playwright/QuickEdit/keyboard-ask-ai/setup.php

26 lines 981 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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