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 / image-flows / setup.php

setup.php in Extendify 3.1.0, at tests/playwright/QuickEdit/image-flows/setup.php

22 lines 852 B
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 // One core/image block — the picker dropdown anchors to it. URL-only (no
5 // attachment id) is acceptable; Image schema's apply() handles the no-id
6 // path so /quick-edit/save doesn't validate the URL points at a real
7 // media item. The placeholder URL is a known wp.org-served asset so the
8 // initial GET doesn't 404 in the browser before the test mocks land.
9 $content = "<!-- wp:image -->\n"
10 . '<figure class="wp-block-image"><img src="https://s.w.org/style/images/about/WordPress-logotype-wmark.png" alt="WordPress mark" /></figure>'
11 . "\n<!-- /wp:image -->\n";
12
13 $pageId = wp_insert_post([
14 'post_type' => 'page',
15 'post_status' => 'publish',
16 'post_title' => 'QE Image Flows Home',
17 'post_content' => $content,
18 ]);
19
20 update_option('show_on_front', 'page');
21 update_option('page_on_front', $pageId);
22