Skip to content

Instantly share code, notes, and snippets.

@akirk
Last active March 7, 2024 16:07
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/3227389983f67d6d7cd9519c5dfda375 to your computer and use it in GitHub Desktop.
Save akirk/3227389983f67d6d7cd9519c5dfda375 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\": \"#0000ff\",' . PHP_EOL . ' \"title\": \"Test Tour\",' . PHP_EOL . ' \"tour_restrict_url\": \"\"' . PHP_EOL . ' },' . PHP_EOL . ' {' . PHP_EOL . ' \"popover\": {' . PHP_EOL . ' \"title\": \"Test Tour\",' . PHP_EOL . ' \"description\": \"You can write a draft here\"' . PHP_EOL . ' },' . PHP_EOL . ' \"element\": \"div#dashboard_quick_press\"' . PHP_EOL . ' },' . PHP_EOL . ' {' . PHP_EOL . ' \"popover\": {' . PHP_EOL . ' \"title\": \"Test Tour\",' . PHP_EOL . ' \"description\": \"These are nearby events!\"' . PHP_EOL . ' },' . PHP_EOL . ' \"element\": \"div#dashboard_primary\"' . 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