10up / distributor

Share content between your websites.
https://distributorplugin.com
GNU General Public License v2.0
640 stars 156 forks source link

Add WordPress Playground integration #1266

Closed jeffpaul closed 1 month ago

jeffpaul commented 2 months ago

Is your enhancement related to a problem? Please describe.

Note that we'll want to set up the playground as a multisite, not fully certain that's yet possible so if not let's open an issue upstream in the playground repo and then mark this as blocked by that.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

dottxado commented 1 month ago

Hello 👋 I am studying Playground and I stumbled upon this issue 😄

If you need a blueprint to run a multisite WordPress instance with your plugin installed and activated, here it is:

{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "wp-admin/network/plugins.php",
  "phpExtensionBundles": [
    "kitchen-sink"
  ],
  "features": {
    "networking": true
  },
  "steps": [
    {
      "step": "enableMultisite"
    },
    {
      "step": "installPlugin",
      "pluginZipFile": {
        "resource": "url",
        "url": "https://github-proxy.com/proxy/?repo=10up/distributor&branch=stable"
      }
    },
    {
      "step": "wp-cli",
      "command": "wp plugin activate distributor-stable --network"
    }
  ]
}

You can test it with this link

I have enabled the multisite, installed Distributor from GitHub using the stable branch and activated it in the network using WP-CLI. Sadly, seems that there is no other choice to activate a network-wide plugin than installing the whole WP-CLI 🤔

I would be happy to work on a PR to add the blueprint to your repo, please let me know 💪

dkotter commented 1 month ago

I would be happy to work on a PR to add the blueprint to your repo, please let me know

@dottxado That would be great if you have time to get a PR open for that. Thanks!