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 / paragraph-below-heading / setup.php

setup.php in Extendify 3.1.1, at tests/playwright/QuickEdit/paragraph-below-heading/setup.php

37 lines 1.5 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 // Seed: paragraph directly below a heading. Two
5 // arrangements: top-level siblings (each block tagged at depth=1 by
6 // TagBlocks) and a group container (only the group is tagged). Both used
7 // to resolve to the heading via the old `isRecognizedBlockEl`
8 // preference in findTagged; with the type-gate dropped and the capture-rule
9 // in place, the innermost tagged ancestor wins regardless of which child
10 // happens to carry a recognized class.
11 $homeContent = "<!-- wp:heading -->\n"
12 . "<h2 class=\"wp-block-heading\" id=\"top-heading\">Top-level heading.</h2>\n"
13 . "<!-- /wp:heading -->\n\n"
14 . "<!-- wp:paragraph -->\n"
15 . "<p id=\"top-paragraph\">Top-level paragraph sitting directly below the heading.</p>\n"
16 . "<!-- /wp:paragraph -->\n\n"
17 . "<!-- wp:group {\"layout\":{\"type\":\"constrained\"}} -->\n"
18 . "<div class=\"wp-block-group\" id=\"group-target\">\n"
19 . "<!-- wp:heading -->\n"
20 . "<h2 class=\"wp-block-heading\" id=\"group-heading\">Heading inside group.</h2>\n"
21 . "<!-- /wp:heading -->\n\n"
22 . "<!-- wp:paragraph -->\n"
23 . "<p id=\"group-paragraph\">Paragraph inside the group, directly below the heading.</p>\n"
24 . "<!-- /wp:paragraph -->\n"
25 . "</div>\n"
26 . "<!-- /wp:group -->\n";
27
28 $pageId = wp_insert_post([
29 'post_type' => 'page',
30 'post_status' => 'publish',
31 'post_title' => 'QE Paragraph Below Heading Home',
32 'post_content' => $homeContent,
33 ]);
34
35 update_option('show_on_front', 'page');
36 update_option('page_on_front', $pageId);
37