create-block-theme
create-block-theme copied to clipboard
Add blueprint.json file to enable plugin previews
This PR adds a blueprint to enable the preview button in the plugin directory.
The behavior based on this definition should exactly match the URL below.
https://playground.wordpress.net/?plugin=create-block-theme&url=/wp-admin/admin.php?page=create-block-theme&networking=yes
There is currently no easy way to test this blueprint in advance, but the preview button is only visible to plugin committers. Therefore, if there is a problem, it will not affect users and can be fixed with follow-up.
I am not a committer of this plugin, so if this PR is merged, I would appreciate it if you could test whether the preview actually works.
Thanks for this. I'd like to merge it and test it, but I haven't been able to find docs on the .wordpress-org directory we'd be adding the blueprint to; could you point me to that?
You can check it here.
https://make.wordpress.org/meta/2023/11/22/plugin-directory-preview-button-revisited/
Also, I forgot to link the issue that this PR closes. This PR will solve #481.
My plugin works in the playground. No errors. https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwp-json%2Fplugins%2Fv1%2Fplugin%2Femogics-tarot-reader-for-wp%2Fblueprint.json%3Furl_hash%3Dfb28acaf87a14fb5e03352ab343d5800
The generate blueprint.json when added to my 'assets' folder does not enable a 'Enable Live Preview'. It states "Note: Missing or invalid blueprint.json file."
https://wordpress.org/plugins/emogics-tarot-reader-for-wp/advanced/
Is this feature working? I believe I have followed all the steps.
@vpelss You need to commit the blueprint.json
file inside assets/blueprints/
, not inside the assets/
directory.
@vpelss You need to commit the
blueprint.json
file insideassets/blueprints/
, not inside theassets/
directory.
Many many thanks!
I don't know how many times I read that page. Not once did I notice the subfolder. Now I just feel embarased..
Thank you for merging! I would appreciate it if you could confirm that the preview actually works as expected. I don't have commit permission for the Create Block Theme plugin, so I can't see the preview button 😅
@t-hamano we've released 2.0, and can now confirm that the preview button works as expected. Thanks!