Log1x / poet

Configuration-based post type, taxonomy, block category, and block registration for Sage 10.

Home Page:https://github.com/Log1x/poet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check pattern content before return pattern blade view

aitormendez opened this issue · comments

Pattern content provided in the block pattern registration arguments are ignored. So this doesn' work:

'block_pattern' => [
    'sage/hero' => [
        'title' => 'Page Hero',
        'description' => 'Draw attention to the main focus of the page, and highlight key CTAs',
        'content' => '<!-- wp:paragraph --><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione nulla culpa repudiandae nisi nostrum et, labore earum repellendus porro, mollitia voluptas quam? Modi sint tempore deleniti nesciunt ab, perferendis et.</p><!-- /wp:paragraph -->',
        'categories' => ['all'],
    ],
],

$view = 'block-patterns.' . Str::after($key, '/');

Discourse ref