hanamura/acf-util
最新稳定版本:1.0.1
Composer 安装命令:
composer require hanamura/acf-util
包简介
Utilities for Advanced Custom Fields
README 文档
README
Utilities for Advanced Custom Fields.
Sample
AcfUtil\AcfValue provides simple access to field objects of Advanced Custom Fields.
// initialize AcfValue with field objects for specific post // note: `get_field_objects()` is a buildin function of Advanced Custom Fields $acf_value = new AcfUtil\AcfValue(get_field_objects($id)); // access field $value = $acf_value->field_name; // access repeater field $value = $acf_value->repeater_field_name; foreach (var $acf_value->repeater_field_name as $repeater_field) { // child field is also AcfValue object $value = $repeater_field->field_name; // deeper repeater fields are accessible foreach (var $repeater_field->deeper_repeater_field_name as $deeper_repeater_field) { // this is also AcfValue object $value = $deeper_repeater_field->field_name; } }
Requirements
WordPress and Advanced Custom Fields plugin.
License
MIT
统计信息
- 总下载量: 1.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-15