<?php
namespace BP3D\Helper;
class Block{
public static function get($id){
$content_post = get_post($id);
$content = $content_post->post_content;
return $content;
}
public static function getBlock($id){
$blocks = parse_blocks(self::get($id));
return $blocks[0];
}
} Back to Directory