Linux 软件免费装
Banner图

ACF Timber Integration

开发者 dream-production
danieltelbis
sticksu
更新时间 2021年2月10日 18:42
PHP版本: 3.7 及以上
WordPress版本: 5.6.1
版权: GPLv2 or later
版权网址: 版权信息

标签

integration acf advanced custom fields timber twig

下载

详情介绍:

This plugin is intended for developers that are using Advanced Custom Fields and Timber to develop their themes. By enabling this plugin the user-defined advanced custom fields will be available in the Timber context variable as follows: Also adds twig functions for images:

安装:

  1. Install Advanced Custom Field v5 or Advanced Custom Fields Pro
  2. Install Timber Wordpress Plugin
  3. Install ACF Timber Integration
  4. Start creating twig files
  5. Profit

常见问题:

Why not just use the get_field() function directly in the twig file?

Because that's not a truly MVC approach. You can still use the get_field() function in twig, but it's easier for the frontend developer to have everything available directly in the context variable.

Timber already plays nice with Advanced Custom Fields, why would I use your plugin?

Timber does not transform Images, Galleries, Posts, Taxonomies or Users to the equivalent Timber Object when using get_field() or accessing the field directly in the post object. You will need to cast each of these in order to use them as Timber Objects without using our plugin.

更新日志:

1.4.0 1.3.2 1.3.1 1.3.0 1.2.1 1.2 1.1 1.0