{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/w4pl-demo/",
  "preferredVersions": {
    "php": "8.2",
    "wp": "latest"
  },
  "phpExtensionBundles": [
    "kitchen-sink"
  ],
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginZipFile": {
        "resource": "wordpress.org/plugins",
        "slug": "w4-post-list"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once 'wordpress/wp-load.php';\n$demo_posts = array(\n\tarray( 'A fresh look for the demo site', '2026-05-30 10:00:00' ),\n\tarray( 'Getting more from custom fields', '2026-01-05 09:00:00' ),\n\tarray( 'Our year in review', '2025-09-14 12:00:00' ),\n\tarray( 'Interview with a plugin author', '2025-06-21 08:30:00' ),\n\tarray( 'Ten tips for faster sites', '2024-11-02 15:00:00' ),\n\tarray( 'Hello from the archive', '2024-03-10 11:00:00' ),\n);\nforeach ( $demo_posts as $p ) {\n\twp_insert_post( array(\n\t\t'post_title'   => $p[0],\n\t\t'post_status'  => 'publish',\n\t\t'post_date'    => $p[1],\n\t\t'post_content' => 'Demo content for the W4 Post List preview.',\n\t) );\n}\n$list_id = wp_insert_post( array(\n\t'post_type'   => 'w4pl',\n\t'post_title'  => 'Demo: Posts grouped by year',\n\t'post_status' => 'publish',\n) );\nupdate_post_meta( $list_id, '_w4pl', array(\n\t'list_type'      => 'posts',\n\t'post_type'      => array( 'post' ),\n\t'posts_per_page' => 10,\n\t'orderby'        => 'post_date',\n\t'order'          => 'DESC',\n\t'groupby'        => 'year',\n\t'template'       => \"<ul>\\n[groups]\\n\\t<li><strong>[group_title]</strong>\\n\\t<ol>\\n\\t[posts]\\n\\t\\t<li><a href=\\\"[post_permalink]\\\">[post_title]</a></li>\\n\\t[/posts]\\n\\t</ol>\\n\\t</li>\\n[/groups]\\n</ul>\",\n) );\nwp_insert_post( array(\n\t'post_type'    => 'page',\n\t'post_title'   => 'W4 Post List demo',\n\t'post_name'    => 'w4pl-demo',\n\t'post_status'  => 'publish',\n\t'post_content' => '[postlist id=\"' . $list_id . '\"]',\n) );\n"
    }
  ]
}
