leoloso/wp-block-data

This package is abandoned and no longer maintained. No replacement package was suggested.

WordPress plugin to extract all data from all blocks inside a of post (created with the Gutenberg content editor)

Installs: 50

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:wordpress-plugin

v0.4 2019-08-21 03:20 UTC

This package is auto-updated.

Last update: 2020-08-21 10:57:58 UTC


README

WordPress plugin to extract all data from all blocks inside of a post (created with Gutenberg)

Install

Install the plugin via Composer

$ composer require leoloso/wp-block-data

And then activate the plugin "WordPress Block Data"

Usage

Obtain the Gutenberg data for all blocks in a post with ID $post_id like this:

$post = get_post($post_id);
$block_data = get_block_data($post->post_content);

The data can also be retrieved through the following REST endpoint:

/wp-json/wp/v2/post-block-data/{POST_ID}

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email leo@getpop.org instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.