plugin-icon

ACF Timber Integration

Automatically enables in the Timber twig context variable all user-defined advanced custom fields.
평가
5
최근 업데이트일
February 10, 2021
버전
1.4.0
활성화된 설치 항목
400
ACF Timber Integration

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:

  • Fields defined for settings pages will be available everywhere under the “options” key
  • Fields defined for posts, pages and custom post types will be available on the \Timber\Post object under the “fields” key
  • Fields defined for terms will be available on the \Timber\Term object under the “fields” key
  • Fields defined for users will be available on the \Timber\User object under the “fields” key

  • Defined menus will also be available everywhere under the “menus” key

Also adds twig functions for images:

  • srcset – used to generate srcset attribute tag. Usage: <img src="{{ post.thumbnail.src('large') }}" {{ srcset(post.thumbnail,'large') }} />
  • image_attr – used to generate srcset, width, height and alt. Usage: <img src="{{ post.thumbnail.src('large') }}" {{ image_attr(post.thumbnail,'large') }} />
무료Creator 요금제에서
활성화된 설치 항목
400
테스트된 버전
5.6.14
이 플러그인은 다운로드 가능하며 워드프레스 독립 호스트 설치에 사용할 수 있습니다.