Convert Blocks to JSON

Description

This plugin offers a powerful solution for exporting and importing WordPress blocks in JSON format, making it easier to manage and reuse block structures across different projects. It is particularly beneficial for developers and site owners who are adopting a Headless CMS approach on the front-end that is powered by tools like React, Vue & so on.

With the ability to seamlessly transfer block data between environments, you can maintain consistency, streamline content updates, and enhance the efficiency of your development workflow.

Contribute

If you’d like to contribute to the development of this plugin, you can find it on GitHub.

To build, clone repo and run yarn install && yarn build

Screenshots

  • Convert Blocks to JSON icon – Convert your blocks to JSON and vice versa.
  • Convert Blocks to JSON options – View, Import Blocks & Export Blocks.
  • Convert Blocks to JSON sidebar – See Convert Blocks to JSON on sidebar.

Installation

  1. Go to ‘Plugins > Add New’ on your WordPress admin dashboard.
  2. Search for ‘Convert Blocks to JSON’ plugin from the official WordPress plugin repository.
  3. Click ‘Install Now’ and then ‘Activate’.
  4. Proceed to your Block Editor and locate the top right corner.
  5. You should now see the ‘Convert Blocks to JSON’ icon available for use.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Convert Blocks to JSON” is open source software. The following people have contributed to this plugin.

Contributors

“Convert Blocks to JSON” has been translated into 2 locales. Thank you to the translators for their contributions.

Translate “Convert Blocks to JSON” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.4

  • Provide graceful fallback for block arrays.
  • Filter out empty|null blocks.
  • Ignore file_get_contents warning.
  • Update Permalink structure if empty, flush rules.
  • Tested up to WP 6.6.2.

1.0.3

  • Replace mt_rand with string version for asset enqueuing.
  • Fix Bugs and Linting issues.
  • Updated README notes with screenshots.
  • Tested up to WP 6.6.2.

1.0.2

  • Refactor: Use is_user_permissible for permissions callback.
  • Updated Unit Tests coverage.
  • Tested up to WP 6.6.2.

1.0.1

  • Added Import functionality.
  • Custom Hooks – cbtj_rest_import.
  • New custom REST API endpoint – cbtj/v1/import.
  • Updated translation files to cater for Import modal window text translations.
  • Added more Unit Tests coverage.
  • Tested up to WP 6.6.2.

1.0.0

  • Convert & Export Blocks to JSON.
  • Custom Hooks – cbtj_rest_response.
  • Provided support for Arabic, Chinese, Hebrew, Hindi, Russian, German, Italian, Croatian, Spanish & French languages.
  • Unit Tests coverage.
  • Tested up to WP 6.6.1.