use standard block.json method with ACF blocks

This commit is contained in:
2025-12-15 18:10:06 +00:00
parent d47b3fdb07
commit f0d8cb2065
22 changed files with 752 additions and 403 deletions

View File

@@ -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",

View File

@@ -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