leoloso / cope-with-wp
WordPress plugin to implement the "Create Once, Publish Everywhere" strategy, leveraging Gutenberg blocks
Installs: 54
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:wordpress-plugin
Requires
- composer/installers: ^1.6
- leoloso/wp-block-data: ^0.4
This package is auto-updated.
Last update: 2020-08-21 10:59:29 UTC
README
WordPress plugin to implement the COPE ("Create Once, Publish Everywhere") strategy, leveraging Gutenberg blocks
Install
Install the plugin via Composer
$ composer require leoloso/cope-with-wp
And then activate the plugin "COPE with WordPress"
Usage
Obtain the Gutenberg medium-agnostic metadata 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); $block_metadata = get_block_metadata($block_data);
The data can also be retrieved through the following REST endpoint:
/wp-json/wp/v2/post-block-metadata/{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.