Plugin Demos With the WordPress Playground ![rw-book-cover](https://joost.blog/wp-content/uploads/2023/12/plugin-demos-wordpress-playground-jpg.webp) ## Metadata - Author: [[Joost de Valk]] - Full Title: Plugin Demos With the WordPress Playground - Category: #articles - Document Note: # Title: Plugin Demos with the WordPress Playground - - - tags: #WordPress #PluginDemos #WordPressPlayground Author: Joost Source: WordPress.org Reference: [Read the full article here](https://wordpress.org/news/2023/11/plugin-demos-with-the-wordpress-playground/) date created: 2023-12-14T10:30 - - - ## Table of Contents: - Introduction - Creating a Blueprint File - Loading a Playground Specific File - Benefits of the WordPress Playground ## Index Creation: - WordPress Playground - Plugin Demos - Blueprint File - Sample Data - Demo Setup ## 📝 Summary: The article discusses the introduction of the WordPress Playground, a new feature on WordPress.org that allows plugin developers to offer live demonstrations of their plugins to users. It explains the process of creating a blueprint file and loading a specific file for the Playground. This feature is considered a game-changer for the WordPress plugin repository, as it provides users with a better way to evaluate plugins before installation. ## 📖 Main Content: ### Introduction - Plugin developers have sought ways to provide users with plugin demonstrations. - The WordPress Playground is introduced as a solution to this problem. - Users prefer trying out a plugin in action rather than reading documentation. ### Creating a Blueprint File - Developers are advised to create a blueprint file in the assets directory of their plugin's subversion checkout. - The blueprint.json file defines the landing page and user login. - Simplified example: [Blueprint.json file](https://wordpress.org/news/2023/11/plugin-demos-with-the-wordpress-playground/) ### Loading a Playground Specific File - In the main plugin file, developers load a class specifically for the Playground. - This class handles tasks such as generating sample data and creating notices for the demo page. - The demo setup can be as simple or complex as desired. - Performance is not compromised as the file only loads on the Playground. ### Benefits of the WordPress Playground - The Playground provides users with an interactive way to experience a plugin. - Users are directed to the correct page for plugin functionality. - Notifications explain what can be done on the demo site. - The feature enhances the plugin repository experience and aids users in making informed choices. ### 🗒️ Notes: - The WordPress Playground is a valuable addition for both plugin developers and users. - Plugin demos improve user experience and decision-making. - The feature supports translation and autoloading for better performance. ## 📖 References: - [Read the full article here](https://wordpress.org/news/2023/11/plugin-demos-with-the-wordpress-playground/) ## 🗣️ Paraphrase: 1. "For years, plugin developers have been looking for ways to demo their plugins to users. Users don’t read readme.txt files or plugin pages on WordPress.org." - Over time, plugin developers have been searching for methods to provide demonstrations of their plugins to users, as users tend to avoid reading readme.txt files or plugin pages on WordPress.org. 2. "This notification only loads and shows on Playground sites." - This notification is exclusive to Playground sites and does not appear elsewhere. ## 🧪 Hypotheses: - Future studies could explore the impact of the WordPress Playground on user engagement and plugin adoption. - Research could investigate user preferences for interactive plugin demonstrations compared to static documentation. ### 📊 Methodology: - Conduct user surveys and analyze user behavior data on WordPress.org to assess the effectiveness of the WordPress Playground. - Collect user feedback to identify areas of improvement for the Playground feature. ### 💡 Implications: - The WordPress Playground has the potential to enhance the user experience on WordPress.org, leading to better plugin selections. - Improved decision-making by users may result in higher plugin satisfaction and fewer compatibility issues. ### 🔮 Future Research: - Investigate the accessibility and usability of the WordPress Playground for users with disabilities. - Explore the impact of plugin demonstrations on reducing user support requests and plugin-related issues. ### ❓ Implications: - Future research into the WordPress Playground's impact on user decision-making could inform the development of similar features on other platforms. - The feature's success may encourage other open-source communities to adopt similar approaches to plugin demos. ### ✅ Logical Validity: - The article presents a logical argument for the WordPress Playground's benefits, supported by practical examples. - The tone is informative and enthusiastic about the potential of the feature. - No logical fallacies are identified. ## Conclusion: The introduction of the WordPress Playground is a significant development for the WordPress plugin repository. It addresses the long-standing challenge of providing users with effective plugin demonstrations. By creating blueprint files and loading specific files for the Playground, developers can offer users an interactive experience that helps them make informed decisions. This feature has the potential to improve user satisfaction and reduce compatibility issues, making it a game-changer for the WordPress plugin ecosystem. - Summary: The WordPress playground is a new feature that allows plugin developers to provide demos of their plugins to users. Users can try out a plugin in action, which is a better way to determine if it solves their problem compared to reading readme.txt files or plugin pages. The playground opens a WordPress environment with the plugin installed, taking users to the relevant page and displaying a notification with instructions. Developers can define a blueprint file and load a specific class for the playground, allowing for the creation of sample data and notices on the demo page. This feature is seen as a game-changer for the WordPress plugin repository. - URL: https://joost.blog/plugin-demos-with-the-wordpress-playground/ For years, plugin developers have been looking for ways to demo their plugins to users. Users don’t read `readme.txt` files or plugin pages on WordPress.org. They want to try and see a plugin in action for a bit, which is a much better way of seeing whether a plugin solves your problem. The new [WordPress playground](https://developer.wordpress.org/playground/) is a perfect way of doing that. So, the meta team at WordPress.org started building a preview button. While the first iteration was not ideal, a few weeks ago, @Tellyworth posted on Make WordPress about the [revisited Playground experiment](https://make.wordpress.org/meta/2023/11/22/plugin-directory-preview-button-revisited/). I, of course, started playing with this feature, and now I can’t wait for it to go live for all users. First, let me show you what I’ve created. [Click this link to open the Fewer Tags playground](https://playground.wordpress.net/?plugin=fewer-tags&blueprint-url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwp-json%2Fplugins%2Fv1%2Fplugin%2Ffewer-tags%2Fblueprint.json%3Frev%3D3010033) in a new tab. ![Screenshot of the WordPress playground with the Fewer Tags plugin loaded and demo data loaded.](https://joost.blog/wp-content/uploads/2023/12/CleanShot-2023-12-14-at-14.58.48.png)Screenshot of the WordPress playground with the Fewer Tags plugin loaded and demo data loaded. As you’ll see, this opens a WordPress Playground, with installed, like in the screenshot above. But it does more. It brings you to the correct page for you to see what Fewer Tags does (the edit tags page), it loads a notification that explains what you can do there. This notification *only loads and shows on Playground sites*. Let me explain to you how to do this: #### Define a blueprint file In the `assets` directory of your WordPress plugin’s subversion checkout, create a subfolder called `blueprints`. In that folder, create a file called `blueprint.json`. You can keep this file incredibly simple. The file for Fewer Tags is here, and it reads just this: As you can see, all it does is define our landing page and log the user in so they can skip that step. Everything else is done with another bit of magic. #### Loading a Playground specific file In the main file of the plugin, we load a class specifically for the Playground, like this: And then we have a [specific class](https://github.com/Emilia-Capital/fewer-tags/blob/develop/src/class-playground.php) that’s loaded, which takes care of a few things: 1. It generates some sample data, in this case, 2 tags and 20 posts. 2. It creates a notice on the page we’re demoing on, with a tiny bit of explanation of what you can do here. Of course, this is a relatively simple plugin and, thus, also a fairly simple demo setup, but you can make this demo setup as complex as you want. Because this file is part of your plugin, you can have all the text translated on WordPress.org. If you use autoloading, as you should, the file never loads if you’re not on the Playground, so it’s not a burden to performance. I think you’ll now agree with me that this is a game-changer for the WordPress plugin repository., Plugin Demos With the WordPress Playground, Joost de Valk, 01hhmn2kdg0yx5jd5zc1w56nwn.