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 / agent-handoff / setup.php

setup.php in Extendify 3.1.1, at tests/playwright/QuickEdit/agent-handoff/setup.php

31 lines 1.2 KB
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 // Mixed block content for the QE → Agent handoff characterization:
5 // - First heading: eligible for both Quick Edit and Ask AI.
6 // - Spacer: wp-block-spacer class triggers IGNORED_CLASS_RX in
7 // agent-gate.js, so the hover bar must not surface Ask AI.
8 // - Post title: wp-block-post-* matches the same IGNORED_CLASS_RX.
9 // - Second heading: also eligible — used to drive the selection-lock
10 // assertion after the first heading has been picked.
11 $content = "<!-- wp:heading -->\n"
12 . "<h2 class=\"wp-block-heading\">First heading for Ask AI handoff.</h2>\n"
13 . "<!-- /wp:heading -->\n\n"
14 . "<!-- wp:spacer -->\n"
15 . "<div style=\"height:80px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n"
16 . "<!-- /wp:spacer -->\n\n"
17 . "<!-- wp:post-title /-->\n\n"
18 . "<!-- wp:heading -->\n"
19 . "<h2 class=\"wp-block-heading\">Second heading for selection lock.</h2>\n"
20 . "<!-- /wp:heading -->\n";
21
22 $pageId = wp_insert_post([
23 'post_type' => 'page',
24 'post_status' => 'publish',
25 'post_title' => 'QE Agent Handoff Home',
26 'post_content' => $content,
27 ]);
28
29 update_option('show_on_front', 'page');
30 update_option('page_on_front', $pageId);
31