[wordpress插件] ACF Timber IntegrationACF木材整合

wordpress 插件 文章 2020-01-27 15:20 560 0 全屏看文

AI助手支持GPT4.0

评分

0

0

描述

This plugin is intended for developers that are using Advanced Custom Fields and Timber to develop their themes.

该插件面向使用高级自定义字段和Timber来开发主题的开发人员。

By enabling this plugin the user-defined advanced custom fields will be available in the Timber context variable as follows:

通过启用此插件,用户定义的高级自定义字段将在Timber上下文变量中可用,如下所示:

    • 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
    • 为帖子,页面和自定义帖子类型定义的字段将在\ Timber \ Post对象的“字段”键下提供

    • Fields defined for terms will be available on the \Timber\Term object under the “fields” key
    • 为术语定义的字段将在\ Timber \ Term对象的“ fields”键下可用

    • Fields defined for users will be available on the \Timber\User object under the “fields” key

      为用户定义的字段将显示在\ Timber \ User对象的“字段”键下

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

      定义的菜单也将在“菜单”键下随处可见

    • In order to reduce the amount of fields provided we limited the automatic processing to the first two levels of post fields.

    • 为了减少提供的字段数量,我们将自动处理限制为发布字段的前两个级别。

      That means that if you have Post A which relates Post B, which relates Post C you will get the fields for Post A and Post B, while for Post C you will get the Timber Post without the processed fields.

      这意味着,如果您具有与帖子B相关联的帖子A,而与帖子C相关联,您将获得帖子A和帖子B的字段,而对于帖子C,您将获得未处理字段的木材帖子。

      To modify the depth use the ‘acf_timber_posts_fields_max_depth’ filter.

    • 要修改深度,请使用“ acf_timber_posts_fields_max_depth”过滤器。

    Also adds twig functions for images:

    还为图像添加了树枝功能:

      • srcset – used to generate srcset attribute tag.

      • srcset –用于生成srcset属性标记。

        Usage:

      • 用法:

      • image_attr – used to generate srcset, width, height and alt.

      • image_attr –用于生成srcset,宽度,高度和alt。

        Usage:

      • 用法:

安装步骤

    1. Install Advanced Custom Field v4 or v5 or Advanced Custom Fields Pro
    2. 安装高级自定义字段v4或v5或高级自定义字段Pro

    3. Install Timber WordPress Plugin
    4. 安装Timber WordPress插件

    5. Install ACF Timber Integration
    6. 安装ACF木材集成

    7. Start creating twig files
    8. 开始创建树枝文件

    9. Profit
    10. 利润

下载地址

https://downloads.wordpress.org/plugin/acf-timber-integration.zip

https://downloads.wordpress.org/plugin/acf-timber-integration.zip

-EOF-

AI助手支持GPT4.0