PluginProbe
Extendify / 3.1.0
Extendify v3.1.0
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 / unsupported-blocks / setup.php

setup.php in Extendify 3.1.0, at tests/playwright/QuickEdit/unsupported-blocks/setup.php

38 lines 1.7 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 // Seeds blocks that have no Quick Edit modal (group, media+text). After
5 // the selector-unification refactor these become selectable — the hover
6 // outline appears and the Ask AI pill renders — but the Quick Edit pill
7 // stays hidden because hasQuickEditModalFor() is false for these types.
8 // Padding on the group gives it hover surface above + below the heading.
9 // Without it, the heading fills the group's bounding box and a center
10 // hover lands on the heading (innermost-tagged wins),
11 // making the group itself unreachable. Real content always
12 // has spacing between blocks; the test fixture has to expose that.
13 $content = "<!-- wp:group {\"layout\":{\"type\":\"constrained\"},\"style\":{\"spacing\":{\"padding\":{\"top\":\"80px\",\"bottom\":\"80px\",\"left\":\"40px\",\"right\":\"40px\"}}}} -->\n"
14 . "<div class=\"wp-block-group\" id=\"group-target\" style=\"padding-top:80px;padding-right:40px;padding-bottom:80px;padding-left:40px\">\n"
15 . "<!-- wp:heading -->\n"
16 . "<h2 class=\"wp-block-heading\">Inside a group container.</h2>\n"
17 . "<!-- /wp:heading -->\n"
18 . "</div>\n"
19 . "<!-- /wp:group -->\n\n"
20 . "<!-- wp:media-text {\"mediaId\":0,\"mediaType\":\"image\"} -->\n"
21 . "<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" id=\"media-text-target\">"
22 . "<figure class=\"wp-block-media-text__media\"></figure>"
23 . "<div class=\"wp-block-media-text__content\">"
24 . "<p>Media + text body copy.</p>"
25 . "</div>"
26 . "</div>\n"
27 . "<!-- /wp:media-text -->\n";
28
29 $pageId = wp_insert_post([
30 'post_type' => 'page',
31 'post_status' => 'publish',
32 'post_title' => 'QE Unsupported Blocks Home',
33 'post_content' => $content,
34 ]);
35
36 update_option('show_on_front', 'page');
37 update_option('page_on_front', $pageId);
38