palmiak / timber-acf-wp-blocks
从 Twig 模板和 ACF 字段创建 Gutenberg 块。
1.15
2021-08-27 09:09 UTC
Requires
- php: >=5.6
Requires (Dev)
- dev-master
- 1.15
- 1.14
- 1.13
- 1.12
- 1.11.3
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- dev-extra-data-filter
- dev-palmiak-patch-1
- dev-default_options
- dev-support-parent-parameter
- dev-beta_plugin
- dev-azure-boards
- dev-quotes_in_keywords
- dev-restyled_test-restyled
- dev-restyled_test
This package is auto-updated.
Last update: 2024-08-28 18:02:51 UTC
README
Timber ACF WP Blocks
通过将模板添加到您的 Timber 主题中,生成 ACF Gutenberg 块。本包主要基于 这篇文章(作者:nicoprat)和 插件(作者:MWDelaney)。
完整文档
贡献者
本插件由贡献者共同开发
创建块
将 Twig 模板添加到 views/blocks
中,这些模板会获取并使用 ACF 数据。每个模板都需要一个包含一些数据的注释块
{# Title: Testimonial Description: Customer testimonial Category: formatting Icon: admin-comments Keywords: testimonial quote "customer testimonial" Mode: edit Align: left PostTypes: page post SupportsAlign: left right SupportsMode: false SupportsMultiple: false #} <blockquote data-{{ block.id }}> <p>{{ fields.testimonial }}</p> <cite> <span>{{ fields.author }}</span> </cite> </blockquote> <style type="text/css"> [data-{{ block.id }}] { background: {{ fields.background_color }}; color: {{ fields.text_color }}; } </style>
Timber 2.0
Timber ACF WP Blocks 完全兼容 Timber 1.x 和 Timber 2.x 版本。