Skip to content

Commit

Permalink
Merge pull request #158 from 10up/feature/plugin-preview
Browse files Browse the repository at this point in the history
Add support for the WordPress.org plugin preview
  • Loading branch information
dkotter authored Dec 14, 2023
2 parents 85254e5 + 547b349 commit be7c4df
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "\/wp-admin\/options-general.php?page=adstxt-settings",
"preferredVersions": {
"php": "7.4",
"wp": "latest"
},
"phpExtensionBundles": ["kitchen-sink"],
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "setSiteOptions",
"options": {
"permalink_structure": "\/%25postname%25\/"
}
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org\/plugins",
"slug": "ads-txt"
},
"options": {
"activate": true
}
},
{
"step": "runPHP",
"code": "<?php require_once 'wordpress\/wp-load.php'; $adstxt_id = wp_insert_post( array( 'post_title' => 'Ads.txt', 'post_content' => '# Example information\n[email protected]\n\n# Example record\ngoogle.com, pub-1234567890, DIRECT, f08c47fec0942fa0', 'post_status' => 'publish', 'post_type' => 'adstxt' ) ); $app_adstxt_id = wp_insert_post( array( 'post_title' => 'App-ads.txt', 'post_content' => '# Example information\n[email protected]\n\n# Example record\ngoogle.com, pub-1234567890, DIRECT, f08c47fec0942fa0', 'post_status' => 'publish', 'post_type' => 'app-adstxt' ) ); if ( ! $adstxt_id instanceof WP_Error ) { update_option( 'adstxt_post', (int) $adstxt_id ); } if ( ! $app_adstxt_id instanceof WP_Error ) { update_option( 'app_adstxt_post', (int) $app_adstxt_id ); }"
}
]
}

0 comments on commit be7c4df

Please sign in to comment.