-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblueprint.json
More file actions
32 lines (32 loc) · 1.68 KB
/
blueprint.json
File metadata and controls
32 lines (32 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"preferredVersions": {
"php": "8.2",
"wp": "latest"
},
"landingPage": "/",
"steps": [
{
"step": "installPlugin",
"pluginData": {
"resource": "url",
"url": "https://github.com/rtCamp/carousel-kit/releases/latest/download/carousel-kit.zip"
}
},
{
"step": "login",
"username": "admin"
},
{
"step": "importWxr",
"file": {
"resource": "url",
"url": "https://raw.githubusercontent.com/rtCamp/carousel-kit/main/examples/data/carousel-kit.xml"
}
},
{
"step": "runPHP",
"code": "<?php require_once 'wordpress/wp-load.php'; switch_theme('twentytwentyfive'); update_option('blogname', 'Carousel Kit by rtCamp'); $homepage = get_page_by_path('homepage'); if ($homepage) { update_option('show_on_front', 'page'); update_option('page_on_front', $homepage->ID); } global $wpdb; $wpdb->query(\"UPDATE $wpdb->posts SET post_content = REPLACE(post_content, 'http://carousel-demo.local', '\" . site_url() . \"')\"); $nav_id = $wpdb->get_var(\"SELECT ID FROM $wpdb->posts WHERE post_type = 'wp_navigation' AND (post_name = 'navigation' OR post_title = 'Navigation') LIMIT 1\"); if ($nav_id && $nav_id != 4) { $old_ref = 'ref' . chr(34) . ':4'; $new_ref = 'ref' . chr(34) . ':' . $nav_id; $wpdb->query($wpdb->prepare(\"UPDATE $wpdb->posts SET post_content = REPLACE(post_content, %s, %s)\", $old_ref, $new_ref)); } if (function_exists('wp_cache_flush')) wp_cache_flush(); ?>"
}
]
}