use standard block.json method with ACF blocks
This commit is contained in:
@@ -6,12 +6,6 @@
|
||||
"description": "An example block powered by ACF",
|
||||
"keywords": ["acf", "demo"],
|
||||
|
||||
"editorScript": "acfdemo-editor-script",
|
||||
"editorStyle": "acfdemo-editor-style",
|
||||
"script": "acfdemo-script",
|
||||
"style": "acfdemo-style",
|
||||
"viewScript": "acfdemo-view-script",
|
||||
|
||||
"acf": {
|
||||
"mode": "preview",
|
||||
"validate": "false",
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<section class="wp-block-{{ $block['slug'] }}">
|
||||
<h2>ACF Example</h2>
|
||||
</section>
|
||||
@extends('layouts.block-acf', [
|
||||
'block' => $block,
|
||||
'is_preview' => $is_preview,
|
||||
'context' => $context,
|
||||
'knockout' => true,
|
||||
])
|
||||
|
||||
@section('block-content')
|
||||
{!! the_field('content') !!}
|
||||
@overwrite
|
||||
|
||||
Reference in New Issue
Block a user