| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
$userId = 1; |
| 5 |
|
| 6 |
// Mirrors the user-meta block in cypress/support/helpers.js cy.resetAll() so |
| 7 |
// specs don't have to dismiss welcome guides / pattern modals on first paint. |
| 8 |
$userSettings = [ |
| 9 |
'core/edit-post' => [ |
| 10 |
'welcomeGuide' => false, |
| 11 |
'core/edit-post/pattern-modal' => false, |
| 12 |
'pattern-modal' => false, |
| 13 |
'edit-post/pattern-modal' => false, |
| 14 |
'patternModal' => false, |
| 15 |
], |
| 16 |
'core/edit-site' => ['welcomeGuide' => false], |
| 17 |
'core' => ['enableChoosePatternModal' => false], |
| 18 |
'_modified' => gmdate('c'), |
| 19 |
]; |
| 20 |
update_user_meta($userId, 'wp_persisted_preferences', $userSettings); |
| 21 |
|
| 22 |
// Theme-agnostic "blueprint applied" marker for global-setup.ts. setup.php is |
| 23 |
// the last blueprint step, so this lands after every other seed. Exposed via |
| 24 |
// the public /?rest_route=/ JSON root (which echoes blogdescription) so the |
| 25 |
// poller doesn't need auth. |
| 26 |
update_option('blogdescription', 'extendify-pw-blueprint-ready'); |
| 27 |
|