Skip to content

Instantly share code, notes, and snippets.

@akirk
Created March 7, 2024 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akirk/dddf3431a6fed464b1fee424cf60c268 to your computer and use it in GitHub Desktop.
Save akirk/dddf3431a6fed464b1fee424cf60c268 to your computer and use it in GitHub Desktop.
{
"landingPage": "/wp-admin/?welcome=0",
"preferredVersions": {
"php": "8.0",
"wp": "latest"
},
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "https://alex.kirk.at/tour-zip.php"
}
},
{
"step": "runPHP",
"code": "<?php require_once 'wordpress/wp-load.php'; wp_insert_post(array('post_title' => 'Test Tour', 'post_type' => 'tour', 'post_content' => '[' . PHP_EOL . ' {' . PHP_EOL . ' \"color\": \"#000000\",' . PHP_EOL . ' \"title\": \"Test Tour\",' . PHP_EOL . ' \"tour_restrict_url\": \"\"' . PHP_EOL . ' },' . PHP_EOL . ' {' . PHP_EOL . ' \"element\": \"div#dashboard_quick_press\",' . PHP_EOL . ' \"popover\": {' . PHP_EOL . ' \"title\": \"Test Tour\",' . PHP_EOL . ' \"description\": \"You can write a draft here\"' . PHP_EOL . ' }' . PHP_EOL . ' }' . PHP_EOL . ']', 'post_status' => 'publish')); ?>"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment