PHP code example of leoloso / wp-block-data
1. Go to this page and download the library: Download leoloso/wp-block-data library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leoloso / wp-block-data example snippets
$post = get_post($post_id);
$block_data = get_block_data($post->post_content);