Last active
July 10, 2017 09:32
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parser = new Gutenberg_PEG_Parser; | |
$blocks = $parser->parse( get_post( $post_id )->post_content ); | |
// ordered array of blocks in the post | |
// each block has the following keys | |
// | |
// 0 => string 'blockName' | |
// 1 => string 'attrs' | |
// 2 => string 'rawContent' | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment