{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/",
  "preferredVersions": {
    "php": "8.3",
    "wp": "latest"
  },
  "phpExtensionBundles": [
    "kitchen-sink"
  ],
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "6arshid-social-community"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once 'wordpress/wp-load.php';\n\nwp_set_current_user( 1 );\n\nupdate_option( 'blogname', '6Arshid Social Community Demo' );\nupdate_option( 'arshid6social_setup_complete', true );\nupdate_option( 'arshid6social_chosen_theme', 'sixarshidsocialcomunity' );\n\nif ( function_exists( 'register_theme_directory' ) && defined( 'ARSHID6SOCIAL_PLUGIN_DIR' ) ) {\n    register_theme_directory( ARSHID6SOCIAL_PLUGIN_DIR . 'themes' );\n}\n\nif ( wp_get_theme( 'sixarshidsocialcomunity' )->exists() ) {\n    switch_theme( 'sixarshidsocialcomunity' );\n}\n\n$home_id = (int) get_option( 'arshid6social_page_home', 0 );\nif ( $home_id > 0 ) {\n    update_option( 'show_on_front', 'page' );\n    update_option( 'page_on_front', $home_id );\n}\n\nupdate_option( 'permalink_structure', '/%postname%/' );\nflush_rewrite_rules();\n\nif ( class_exists( '\\\\Arshid6Social\\\\Admin\\\\Sample_Data' ) && ! get_option( 'arshid6social_sample_data_imported' ) ) {\n    try {\n        $sample = \\Arshid6Social\\Admin\\Sample_Data::instance();\n        $method = new ReflectionMethod( $sample, 'import' );\n        $method->setAccessible( true );\n        $ids = $method->invoke( $sample );\n\n        if ( is_array( $ids ) ) {\n            update_option( 'arshid6social_sample_data_imported', true, false );\n            update_option( 'arshid6social_sample_data_ids', $ids, false );\n        }\n    } catch ( Throwable $e ) {\n        // Keep the Playground demo usable even if sample-data import changes.\n    }\n}\n"
    }
  ]
}