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 / click-rule / setup.php

setup.php in Extendify 3.1.0, at tests/playwright/QuickEdit/click-rule/setup.php

40 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 // Click-rule seed: a tagged paragraph with an inline link (anchor
5 // branch), a plain tagged paragraph (select branch), a search input (form-
6 // control focus branch), and a second page so the navigate + edit-mode
7 // persistence assertion has a real URL to land on.
8 wp_insert_post([
9 'post_type' => 'page',
10 'post_status' => 'publish',
11 'post_title' => 'About',
12 'post_content' => "<!-- wp:heading --><h2 class=\"wp-block-heading\">About page reached.</h2><!-- /wp:heading -->\n",
13 ]);
14
15 $homeContent = "<!-- wp:heading -->\n"
16 . "<h2 class=\"wp-block-heading\">Click rule home.</h2>\n"
17 . "<!-- /wp:heading -->\n\n"
18 . "<!-- wp:paragraph -->\n"
19 . "<p>This paragraph has an <a href=\"/about/\">inline About link</a> mid-sentence.</p>\n"
20 . "<!-- /wp:paragraph -->\n\n"
21 . "<!-- wp:paragraph -->\n"
22 . "<p>A second paragraph with no link, plain text to click on.</p>\n"
23 . "<!-- /wp:paragraph -->\n\n"
24 . "<!-- wp:group {\"layout\":{\"type\":\"constrained\"}} -->\n"
25 . "<div class=\"wp-block-group\"><!-- wp:paragraph -->\n"
26 . "<p>Inside the Ask-AI-only group.</p>\n"
27 . "<!-- /wp:paragraph --></div>\n"
28 . "<!-- /wp:group -->\n\n"
29 . "<!-- wp:search {\"label\":\"Search\",\"buttonText\":\"Go\"} /-->\n";
30
31 $pageId = wp_insert_post([
32 'post_type' => 'page',
33 'post_status' => 'publish',
34 'post_title' => 'QE Click Rule Home',
35 'post_content' => $homeContent,
36 ]);
37
38 update_option('show_on_front', 'page');
39 update_option('page_on_front', $pageId);
40