| | |
| | | { |
| | | $this->cache = Cache::for('blocks', WEEK_IN_SECONDS); |
| | | $this->cache->connect('post')->connect('taxonomy'); |
| | | add_filter('render_block', [$this, 'render'], 999, 3); |
| | | add_filter('render_block', [$this, 'render'], 990, 3); |
| | | |
| | | add_action('init', [$this, 'registerBlockStyles']); |
| | | } |
| | |
| | | global $post; |
| | | |
| | | $block['innerBlocks'] = parse_blocks($post->post_content); |
| | | return $this->innerBlocks($block); |
| | | $result = $this->innerBlocks($block); |
| | | } else { |
| | | return $this->inside($block, $tag, $content); |
| | | $result = $this->inside($block, $tag, $content); |
| | | } |
| | | |
| | | return apply_filters('jvb_post_content_output', $result, $block); |
| | | } |
| | | //core_post_date |
| | | public function render_core_post_date(array $block):string |