diff --git a/blueprints/my-wordpress/plugin/about.html b/blueprints/my-wordpress/plugin/about.html index 311e25ce..04f9da35 100644 --- a/blueprints/my-wordpress/plugin/about.html +++ b/blueprints/my-wordpress/plugin/about.html @@ -1,56 +1,86 @@ - -
This is a real WordPress, running entirely in your browser. No server, no account, no data leaving your machine.
+ +A real WordPress running entirely in your browser. No server, no account, no data leaving your machine.
- -This WordPress runs through WordPress Playground, a technology that lets WordPress run directly in your browser using WebAssembly. Your content is stored in your browser's local storage.
+ +The site runs through WordPress Playground, a technology that lets WordPress run directly in your browser via WebAssembly. Your content is stored in your browser's local storage.
+ +Your data never touches a server. It exists only on your device.
+No signup, no email, no password.
+No hosting costs, no subscriptions, no catches.
+This is not a demo. Install plugins, change themes, and customize everything.
+Because it's private and persistent, this WordPress works well for things you might not publish:
+ +Because it's private and persistent, it works well for things you'd rather not publish:
- -Want to learn more about what WordPress can do?
- - - -This browser-based WordPress is great for personal use. When you want to access your site from multiple devices, share it publicly, or collaborate with others, you can export everything and move to hosted WordPress. What you build here comes with you.
+ +Ready to go further? Move to hosted WordPress whenever you want. Everything you've built comes with you.
diff --git a/blueprints/my-wordpress/plugin/de/welcome-post.html b/blueprints/my-wordpress/plugin/de/welcome.html similarity index 100% rename from blueprints/my-wordpress/plugin/de/welcome-post.html rename to blueprints/my-wordpress/plugin/de/welcome.html diff --git a/blueprints/my-wordpress/plugin/es/welcome-post.html b/blueprints/my-wordpress/plugin/es/welcome.html similarity index 100% rename from blueprints/my-wordpress/plugin/es/welcome-post.html rename to blueprints/my-wordpress/plugin/es/welcome.html diff --git a/blueprints/my-wordpress/plugin/pl/welcome-post.html b/blueprints/my-wordpress/plugin/pl/welcome.html similarity index 100% rename from blueprints/my-wordpress/plugin/pl/welcome-post.html rename to blueprints/my-wordpress/plugin/pl/welcome.html diff --git a/blueprints/my-wordpress/plugin/playground-welcome.php b/blueprints/my-wordpress/plugin/playground-welcome.php index 91af26a0..c3aad74d 100644 --- a/blueprints/my-wordpress/plugin/playground-welcome.php +++ b/blueprints/my-wordpress/plugin/playground-welcome.php @@ -2,7 +2,7 @@ /** * Plugin Name: Playground Welcome * Description: Replaces the default Hello World post and Sample Page with welcome content for WordPress Playground. - * Version: 1.1.0 + * Version: 1.2.0 * Author: Playground * License: GPL-2.0+ * Text Domain: playground-welcome @@ -33,44 +33,53 @@ private function maybe_setup_content() { add_filter('wp_kses_allowed_html', [__CLASS__, 'allow_svg_tags']); - $post = get_post(1); - if ($post) { + $welcome = get_post(1); + if ($welcome) { wp_update_post([ - 'ID' => $post->ID, + 'ID' => $welcome->ID, + 'post_type' => 'page', 'post_title' => __('Welcome to Your WordPress', 'playground-welcome'), - 'post_content' => self::get_welcome_post_content(), + 'post_content' => self::get_welcome_content(), 'post_name' => 'welcome-to-your-wordpress', + 'comment_status' => 'closed', + 'ping_status' => 'closed', ]); + wp_delete_comment(1, true); } - $sample_page = get_post(2); - if ($sample_page) { + $about = get_post(2); + if ($about) { wp_update_post([ - 'ID' => $sample_page->ID, + 'ID' => $about->ID, 'post_title' => __('About this WordPress', 'playground-welcome'), 'post_content' => self::get_about_page_content(), 'post_name' => 'about', ]); } + if ($welcome) { + update_option('show_on_front', 'page'); + update_option('page_on_front', (int) $welcome->ID); + } + update_option($this->content_created_option, true); } - public static function get_welcome_post_path() { + public static function get_welcome_path() { $locale = determine_locale(); $lang = substr($locale, 0, 2); $plugin_dir = plugin_dir_path(__FILE__); - $localized_file = $plugin_dir . $lang . '/welcome-post.html'; + $localized_file = $plugin_dir . $lang . '/welcome.html'; if (file_exists($localized_file)) { return $localized_file; } - return $plugin_dir . 'welcome-post.html'; + return $plugin_dir . 'welcome.html'; } - public static function get_welcome_post_content() { - $path = self::get_welcome_post_path(); + public static function get_welcome_content() { + $path = self::get_welcome_path(); if (file_exists($path)) { return file_get_contents($path); } diff --git a/blueprints/my-wordpress/plugin/welcome-post.html b/blueprints/my-wordpress/plugin/welcome-post.html deleted file mode 100644 index 2d54d11a..00000000 --- a/blueprints/my-wordpress/plugin/welcome-post.html +++ /dev/null @@ -1,232 +0,0 @@ - -🎨
- - - -
- Experiment freely
Change anything, try
- things out, make it yours
-
💾
- - - -
- It stays
Your changes are saved and will
- be here tomorrow
-
🔒
- - - -
- It's private
Runs in your browser, no
- account needed
-
- Check out the Apps menu — Look for this icon in the top bar to install apps and more. -
- -- ⭐ Bookmark this page — This is your WordPress now. Add - it to your bookmarks so you can easily come back. -
- -- Look for the grid icon () in the top bar. From there you can: -
- - - -Enjoy your WordPress!
- diff --git a/blueprints/my-wordpress/plugin/welcome.html b/blueprints/my-wordpress/plugin/welcome.html new file mode 100644 index 00000000..dc107716 --- /dev/null +++ b/blueprints/my-wordpress/plugin/welcome.html @@ -0,0 +1,172 @@ + +Change everything, undo anything. This is your space to try things out.
+All your changes are saved and will be here when you get back.
+Nothing leaves your browser. No account, no one else involved.
+Install plugins, manage backups, and more from the grid icon in the top bar.
+It's yours. Treat it like a tab you never want to lose.
+Use it as a notebook, project space, or creative sandbox. A private corner of the web, just for you.
+Update your theme, set it up in a way that makes sense to you. You'll pick up WordPress naturally as you go.
+Your WordPress lives in this browser's storage. It won't be accessible from other devices, which also makes it completely private.
+Save your site from the top menu. Useful if you ever want to restore it in another browser.
+You can move your WordPress to hosted infrastructure anytime — to access it from other devices, share it, or collaborate.
+Find the grid icon () in the top bar to:
+ + + +Curated plugins for private use, plus the full WordPress directory.
+Save and restore your site.
+Reset, or head to playground.wordpress.net for quick experiments.
+Enjoy your WordPress.
+