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 / auto-save / setup.php

setup.php in Extendify 3.1.0, at tests/playwright/QuickEdit/auto-save/setup.php

28 lines 1.0 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 // Auto-save-on-implicit-close seed. Three quick-editable headings: A + B
5 // drive the cross-block gesture (edit A, click B → A auto-saves and QE
6 // opens on B), C drives the click-outside gesture (edit C, click the
7 // footer → C auto-saves and the canvas tears down). Headings get both
8 // pills and open QE on click, so the spec never has to touch a pill.
9 $content = "<!-- wp:heading -->\n"
10 . "<h2 class=\"wp-block-heading\">Heading A for cross-block auto-save.</h2>\n"
11 . "<!-- /wp:heading -->\n\n"
12 . "<!-- wp:heading -->\n"
13 . "<h2 class=\"wp-block-heading\">Heading B is the cross-block target.</h2>\n"
14 . "<!-- /wp:heading -->\n\n"
15 . "<!-- wp:heading -->\n"
16 . "<h2 class=\"wp-block-heading\">Heading C for click-outside auto-save.</h2>\n"
17 . "<!-- /wp:heading -->\n";
18
19 $pageId = wp_insert_post([
20 'post_type' => 'page',
21 'post_status' => 'publish',
22 'post_title' => 'QE Auto-Save Home',
23 'post_content' => $content,
24 ]);
25
26 update_option('show_on_front', 'page');
27 update_option('page_on_front', $pageId);
28