Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (13 sloc) 347 Bytes
<?php
/**
* Helper Functions
*/
use GutesObjectPlugin\API;
function get_editor_blocks( $post_id = false ) {
if ( ! $post_id ) {
return new WP_Error( 'no post id', __( 'get_editor_blocks requires a post ID', 'gutes-array' ) );
}
$API = new API();
$blocks = $API->get_editor_db( $post_id );
return json_decode( $blocks->gutes_array );
}
You can’t perform that action at this time.