{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/arpvc-demo/",
  "preferredVersions": {
    "php": "8.1",
    "wp": "latest"
  },
  "login": true,
  "steps": [
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once '/wordpress/wp-load.php';\n\n$settings = array(\n    'progress_enabled'      => true,\n    'foreground_color'      => '#16a34a',\n    'background_color'      => '#e5e7eb',\n    'position'              => 'top',\n    'thickness'             => 8,\n    'post_types'            => array( 'post' ),\n    'display_mode'          => 'bar',\n    'read_count_enabled'    => true,\n    'read_count_locations'  => array( 'post' ),\n    'read_count_position'   => 'before-content',\n    'read_count_prefix'     => 'Views:',\n    'read_count_suffix'     => '',\n    'read_count_lock_hours' => 24,\n    'read_count_wpm'        => 200,\n    'read_count_font_size'  => 14,\n    'read_count_margin'     => array( 8, 8, 8, 8 ),\n    'read_count_padding'    => array( 10, 12, 10, 12 ),\n    'read_count_bg_color'   => '#0f766e',\n    'read_count_text_color' => '#ffffff',\n);\n\nupdate_option( 'arpvc_settings', $settings );\n\n$post_id = get_page_by_path( 'arpvc-demo', OBJECT, 'post' );\n\nif ( ! $post_id ) {\n    $post_id = wp_insert_post(\n        array(\n            'post_title'   => 'Advanced Reading Progress & View Counter Demo',\n            'post_name'    => 'arpvc-demo',\n            'post_status'  => 'publish',\n            'post_type'    => 'post',\n            'post_author'  => 1,\n            'post_content' => '<h2>Try the reading progress bar</h2>\n<p>Scroll through this demo article and watch the progress indicator at the top of the screen. The view counter above the content shows how many views this post has received.</p>\n<h2>Reading Progress</h2>\n<p>The progress bar follows your reading position as you move through the article. Continue scrolling to the bottom to see it reach 100 percent.</p>\n<p>This sample content is intentionally long enough to make the progress indicator easy to test on desktop and mobile-sized screens.</p>\n<h2>View Counter</h2>\n<p>The view counter records a view and uses the configured anti-refresh lock window. Refreshing the page repeatedly within the lock period will not create another view for the same visitor.</p>\n<h2>Customization</h2>\n<p>On a normal WordPress site, administrators can change the progress indicator colors, thickness, position, display mode, supported post types, and view-counter settings from Reading Progress &amp; Views.</p>\n<h2>Shortcode</h2>\n<p>You can also place the counter manually with <code>[arpvc_view_counter]</code>.</p>\n<p>Keep scrolling to test the complete reading experience provided by Advanced Reading Progress &amp; View Counter.</p>',\n        ),\n        true\n    );\n\n    if ( is_wp_error( $post_id ) ) {\n        throw new RuntimeException( $post_id->get_error_message() );\n    }\n}\n"
    }
  ]
}