Advanced Custom Fields – ACF 高级自定义字段

描述

使用高级自定义域插件可以完全控制WordPress编辑屏幕和自定义字段数据。

按需添加字段。我们的字段编辑器只需单击几个按钮,就可以快速、轻松地将字段添加到WP编辑屏幕!

将它们添加到任何地方。可以在WP上添加字段,包括文章、用户、分类项目、媒体、评论甚至自定义选项页面!

在任何地方显示它们。使用我们无忧的开发人员友好功能,在任何主题模板文件中加载并显示您的自定义字段值!

特征

  • 简单 & 直观
  • 功能强大
  • 超过30种字段类型
  • 广泛的文档
  • 数百万用户

链接

PRO

Advanced Custom Fields 插件也可以在专业版本中使用,该版本包括更多字段,更多功能和更多灵活性! 了解详情

屏幕截图

  • 简单直观

  • 专为开发者打造

  • 关于字段的所有信息

安装

从你的WordPress仪表板

  1. 访问 插件 > 安装插件
  2. 搜索 搜索”Advanced Custom Fields”
  3. 从“插件”页面 激活 Advanced Custom Fields (高级自定义字段)
  4. 点击 在新菜单项“自定义字段”上,创建您的第一个自定义字段组!
  5. 阅读 文档以开始使用

常见问题

您提供什么样的支持?

帮助台。目前通过我们的电子邮件帮助台提供支持。问题一般在24小时内回答,周末和节假日除外。我们回答与ACF及其使用相关的问题,并提供少量定制指导。我们不能保证对包括自定义主题代码或第三方插件冲突和兼容性的问题的支持。开支持票

支持论坛。我们的社区论坛为搜索和查找以前回答和询问过的支持问题提供了很好的资源。您可以在这些论坛上创建新话题,但是,不能保证您会收到我们支持团队的答复。这是开发人员可以互相交谈,发布想法,插件并提供基本帮助的一个领域。 查看支持论坛

评价

2020年11月25日
This plugin is fantastic. It allows me to customize my sites so easily - if it were not available, the only way I could do some of the things I come up with would be to program my own plugins, which I do from time-to-time, but it's so time-consuming and I always worry about the security of the plugins I write, because it's not what I do day-in and day-out. But, this plugin lets me implement so many of my ideas very easily and very quickly. I really love this plugin.
2020年10月12日
It is so versatile and powerful itself, plus has tons of official and third-party integrations (free and paid). The documentation is good, and even if you are not a pro coder, ACF is so well known around that you can find tutorials or code samples for about anything also out of the official channels. But, if you need them, their support forum is amazing, even for non-pro users. 5 star plus
阅读所有的1,116评价

贡献者以及开发者

“Advanced Custom Fields – ACF 高级自定义字段” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

"Advanced Custom Fields – ACF 高级自定义字段 "已被翻译成21种语言。 感谢译者的贡献。

将“Advanced Custom Fields – ACF 高级自定义字段”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

5.9.4

发布日期 – 2021年1月14日

  • 增强功能 – 为电子邮件字段添加了PHP验证(以前仅依赖于浏览器验证)。
  • 修复 – 添加了对PHP 8.0的支持(修复了已记录的警告)。
  • 修复 – 添加了对jQuery 3.5的支持(修复了已记录的警告)。
  • 修复 – 修复了导致所见即所得字段在Gutenberg编辑器中显示为无响应的错误。
  • 修复 – 修复了回归问题,使“ blog_%d”和“ site_%d”成为自定义分类术语的有效 $ post_id 值。
  • 修复 – 修复了导致单选按钮字段标签选择首选的错误。
  • 修复 – 修复了阻止预加载包含多个父DOM元素的块的错误。
  • i18n – 感谢高桥凉(Ryo Takahashi),更新了日语翻译。
  • 国际化(i18n) – 感谢PedroMendonça更新了葡萄牙语翻译。

5.9.3

发布日期 – 2020年11月3日

  • 修复 – 修复了导致修订元错误地更新父内容元的错误。
  • 修复 – 修复了阻断“按帖子类型过滤”和“按分类过滤”字段设置的错误。

5.9.2

发布日期 – 2020年10月29日

  • 增强功能 – 添加了用于预加载块HTML并减少页面加载时AJAX请求的实验。
  • 修复-向JSX解析器添加了布尔属性值检测(修复了templateLock =“ false”的问题)。
  • 修复-向JSX解析器规则集添加了“ dateTime”属性。
  • 修复-修复了复制行或布局后无响应的Select2实例。
  • 修复-为以前的WordPress版本添加了缺少的颜色选择器脚本翻译。
  • 修复-修复克隆字段中的错误,如果克隆不再存在的字段组,则可能导致PHP错误。
  • 修复-修复了在比较包含不再存在的字段值的修订时记录的PHP警告。
  • Dev-添加了$wp_block参数来阻止render_callback 和 render_template(在AJAX预览请求期间不可用)。
  • 开发 – 已弃用acf_get_term_post_id()函数。

5.9.1

发布日期 – 2020年9月8日

  • 修复-修复了导致“预览发布”按钮发布更改的问题。
  • 修复-修复了用Elementor或Beaver Builder编辑时引起JS错误的guten-bug。
  • 修复-修复了颜色选择器字段中的错误,该错误导致前端表单上出现JS错误。
  • 修复-修复了文章分类法位置规则中的错误,该错误会导致规则选择列表不完整。
  • 修复-由于DX反馈,还原了本地JSON“保存到源路径”增强功能。
  • i18n-感谢 Rio Bahtiar 更新了印尼语翻译。
  • i18n – Updated Turkish translation thanks to Emre Erkan.

5.9.0

发布日期:2020年8月17日

  • Enhancement – New Field Groups admin.
    • Added toolbar across all ACF admin pages.
    • Added new table columns: Description, Key, Location, Local JSON.
    • Added popup modal to review Local JSON changes before sync.
    • Added visual representation of where Field Groups will appear.
    • Added new help tab.
    • Simplified layout.
  • Enhancement – New ACF Blocks features.
    • Added support for Inner Blocks.
    • Added new “jsx” setting.
    • Added new “align_text” settings.
    • Added new “align_content” settings.
  • Enhancement – Added duplicate functionality for Repeater and Flexible Content fields.
  • Enhancement – Added PHP validation support for Gutenberg.
  • Enhancement – Added ability to bypass confirmation tooltips (just hold shift).
  • Enhancement – Local JSON files now save back to their loaded source path (not “save_json” setting).
  • Tweak – Replaced all custom icons with dashicons.
  • 调整 – 将自定义帖子状态标签从“无效”更改为“已禁用”。
  • 调整 – 改进了位于块编辑器侧栏中的元框的样式。
  • 修复-在编辑块 className 或锚点属性时提高了AJAX请求效率。
  • 修复 – 修复了通过向上/向下箭头移动块后导致所见即所得字段无响应的错误。
  • 修复 – 修复了导致HTML在同一个可重用块的多个实例之间跳转的错误。
  • 修复 – 修复了保存草稿时有时显示验证错误的错误。
  • 修复 – 修正了在显示缩放的肖像附件时打破图像字段UI的错误。
  • 修复 – 修复了链接字段中的错误,错误地将“取消”按钮视为“提交”。
  • 修复 – 修复了折叠的Repeater行中的子字段没有增长到可用宽度的错误。
  • 修复 – 确保“页面链接”字段下拉列表中显示的所有存档URL都是唯一的。
  • 修复 – 修复了在复制字段组时在嵌套字段上导致错误的条件逻辑设置的错误。
  • 修复 – 修复了一些密码管理浏览器扩展引起的许可证激活问题的错误。
  • 开发 – 对 ACF_Location 类的重大改进。
  • 开发 – 重构所有位置类以优化性能。
  • 开发 – 从“ acf-input.js”中提取核心JavaScript到单独的“ acf.js”文件中。
  • 开发 – 字段组导出现在将“活动”属性显示为bool而不是int。
  • 开发 – 添加过滤器“ acf / get_object_type”以自定义WP对象信息,例如“标签”和“图标”。
  • 开发 – 在页脚中打印上传器(WP媒体)脚本时,触发了添加的操作“ acf / admin_print_uploader_scripts”。
  • 开发 – 添加过滤器“ acf / pre_load_attachment”和“ acf / load_attachment”以自定义附件详细信息。
  • 开发 – 添加过滤器“ acf / admin / toolbar”以自定义管理工具栏项目。
  • 开发 – 添加新的JS在复制行时触发的“ duplicate_fields”和“ duplicate_field”动作。
  • 国际化(i18n) – 将克罗地亚语区域代码从“ hr_HR”更改为“ hr”。
  • 国际化(i18n) – 感谢PedroMendonça更新了葡萄牙语翻译。
  • i18n – Updated French Canadian translation thanks to Bérenger Zyla.
  • i18n – Updated French translation thanks to Maxime Bernard-Jacquet.
  • i18n – Updated German translations thanks to Ralf Koller.

5.8.14

发布日期:2020年8月13日

  • 修复 – 修复了在WordPress 5.5中破坏ACF块 $ is_preview 参数的错误。
  • 修复 – 修复了WordPress5.5中打破无缝邮箱样式的错误。

5.8.13

Release Date – 10 August 2020

  • Tweak – Added styling compatibility for WordPress 5.5.
  • Fix – Implemented new wp_filter_content_tags() function in “acf_the_content” filter.
  • 国际化(i18n) – 感谢Karim Ramadan更新了阿拉伯语翻译。

5.8.12

Release Date – 10 June 2020

  • Fix – Improved string escaping in Select2 drop-downs to address XSS concerns.
  • Fix – Fixed bug causing PHP error when updating the settings of a Checkbox field.
  • Fix – Fixed bug causing WYSIWYG field to hide when toggling between Document and Block tabs within the Block editor.
  • Fix – Fixed bug incorrectly validating the length of Text and Textarea field values that contained HTML entities.

5.8.11

Release Date – 12 May 2020

  • Fix – Fixed bug in ACF Blocks where “inserter examples” and “block templates” did not load the defined “data”.
  • Fix – Reverted “fix” in 5.8.9 regarding Taxonomy fields saving terms to non “post” objects.
  • Fix – Fixed bug allowing the Image field to save the value of a deleted attachment.
  • Fix – Improved Select field format_value() behaviour to correctly cast value types depending on the “multiple” setting.
  • Tweak – Changed language fallback for “zh_HK” to “zh_TW”.
  • Tweak – Changed Time Picker field settings to display in a localized format via date_i18n().
  • Tweak – Improved CSS styling of menu item fields.
  • i18n – Updated Finnish translation thanks to Mikko Kekki
  • i18n – Updated French translation thanks to Maxime Bernard-Jacquet.
  • i18n – Updated Turkish translation thanks to Emre Erkan.

5.8.10

Release Date – 12 May 2020

  • See hotfix version 5.8.11 for release notes.

5.8.9

Release Date – 26 March 2020

  • Fix – Fixed bug in ACF Blocks causing default “align” property to be ignored.
  • Fix – Fixed bug allowing Taxonomy field to save terms to a non “post” object.
  • Tweak – Improved User field AJAX query performance.
  • Tweak – Improved logic that determines width of Range field input.
  • Tweak – Improved styling of ACF Blocks components.
  • Dev – Added new “acf/register_block_type_args” filter.
  • Dev – Added new generic ACF_Ajax_Query and ACF_Ajax_Query_Users classes.
  • i18n – Updated French Canadian translation thanks to Bérenger Zyla.
  • i18n – Updated Traditional Chinese translation thanks to Audi Lu.
  • i18n – Updated German translation thanks to Ralf Koller.
  • 国际化(i18n) – 感谢PedroMendonça更新了葡萄牙语翻译。

5.8.8

Release Date – 4 March 2020

  • Fix – Fixed bug in have_rows() function causing a PHP warning when no value is found.
  • Fix – Fixed bug in Google Maps field causing marker to snap to nearest address.
  • Fix – Avoid Nav Menu items displaying twice in WordPress 5.4.
  • Tweak – Added place name data to Google Maps field value.
  • Tweak – Improved performance of PHP registered fields.
  • Dev – Added new “acf/prepare_field_group_for_import” filter.
  • i18n – Added Traditional Chinese translation thanks to Audi Lu.
  • i18n – Added Catalan translation thanks to Jordi Tarrida.
  • i18n – Updated French translation thanks to Maxime Bernard-Jacquet & Bérenger Zyla.

5.8.7

Release Date – 12 November 2019

  • New – Updated admin CSS for new WordPress 5.3 styling.
  • Fix – Fixed various issues affecting dynamic metaboxes in the block editor (requires WordPress 5.3)
  • Fix – Fixed performance issue when checking network sites for upgrades.
  • Fix – Fixed Select2 clones appearing after duplicating a Relationship field.
  • Tweak – Repeater field “Add row” icons will now hide when maximum rows are reached.
  • Tweak – Removed ACF Blocks keyword limit for later versions of Gutenberg.

5.8.6

Release Date – 24 October 2019

  • New – Added more data to Google Maps field value including place_id, street_name, country and more.
  • Fix – Fixed bug in Gallery field incorrectly displaying .pdf attachments as icons.
  • Fix – Fixed bug in Checkbox field missing “selected” class after “Toggle All”.
  • Dev – Added compatibility for Attachments in the Post Taxonomy location rule.
  • Dev – Added missing return statement from acf_get_form() function.
  • Dev – Added “google_map_result” JS filter.

5.8.5

Release Date – 8 October 2019

  • New – Added new choice “Add” to the User Form location rule.
  • New – Optimized acf_form() logic when used in combination with acf_register_form().
  • Fix – Fixed bug causing incorrect field order after sync.
  • Fix – Fixed bug reverting the first field type to Text in Firefox version 69.0.1.
  • Fix – Fixed bug causing tinymce issues when changing between block modes.
  • Fix – Fixed bug preventing block registration when category does not exist.
  • Fix – Fixed bug preventing block registration when no icon is declared.
  • Dev – Added RegExp compatibility for innerBlocks.

5.8.4

Release Date – 3 September 2019

  • New – Optimized Relationship field by delaying AJAX call until UI is visible.
  • Fix – Fixed bug incorrectly escaping HTML in the Link field title.
  • Fix – Fixed bug showing Discussion and Comment metaboxes for newly imported field groups.
  • Fix – Fixed PHP warning when loading meta from Post 0.
  • Dev – Ensure Checkbox field value is an array even when empty.
  • Dev – Added new ACF_MAJOR_VERSION constant.

5.8.3

Release Date – 7 August 2019

  • Tweak – Changed Options Page location rules to show “page_title” instead of “menu_title”.
  • Fix – Fixed bug causing Textarea field to incorrectly validate maxlength.
  • Fix – Fixed bug allowing Range field values outside of the min and max settings.
  • Fix – Fixed bug in block RegExp causing some blocks to miss the “acf/pre_save_block” filter.
  • Dev – Added $block_type parameter to block settings “enqueue_assets” callback.
  • i18n – Added French Canadian language thanks to Bérenger Zyla.
  • i18n – Updated French language thanks to Bérenger Zyla.

5.8.2

Release Date – 15 July 2019

  • Fix – Fixed bug where validation did not prevent new user registration.
  • Fix – Fixed bug causing some “reordered” metaboxes to not appear in the Gutenberg editor.
  • Fix – Fixed bug causing WYSIWYG field with delayed initialization to appear blank.
  • Fix – Fixed bug when editing a post and adding a new tag did not refresh metaboxes.
  • Dev – Added missing $value parameter in “acf/pre_format_value” filter.

5.8.1

Release Date – 3 June 2019

  • New – Added “Preview Size” and “Return Format” settings to the Gallery field.
  • Tweak – Improved metabox styling for Gutenberg.
  • Tweak – Changed default “Preview Size” to medium for the Image field.
  • Fix – Fixed bug in media modal causing the primary button text to disappear after editing an image.
  • Fix – Fixed bug preventing the TinyMCE Advanced plugin from adding < p > tags.
  • Fix – Fixed bug where HTML choices were not visible in conditional logic dropdown.
  • Fix – Fixed bug causing incorrect order of imported/synced flexible content sub fields.
  • i18n – Updated German translation thanks to Ralf Koller.
  • i18n – Updated Persian translation thanks to Majix.

5.8.0

Release Date – 8 May 2019

  • New – Added ACF Blocks feature for ACF PRO.
  • Fix – Fixed bug causing duplicate “save metabox” AJAX requests in the Gutenberg editor.
  • Fix – Fixed bug causing incorrect Repeater field value order in AJAX requests.
  • Dev – Added JS filter 'relationship_ajax_data' to customize Relationship field AJAX data.
  • Dev – Added $field_group parameter to 'acf/location/match_rule' filter.
  • Dev – Bumped minimum supported PHP version to 5.4.0.
  • Dev – Bumped minimum supported WP version to 4.7.0.
  • i18n – Updated German translation thanks to Ralf Koller.
  • i18n – Updated Portuguese language thanks to Pedro Mendonça.

5.7.13

Release Date – 6 March 2019

  • Fix – Fixed bug causing issues with registered fields during switch_to_blog().
  • Fix – Fixed bug preventing sub fields from being reused across multiple parents.
  • Fix – Fixed bug causing the get_sub_field() function to fail if a tab field exists with the same name as the selected field.
  • Fix – Fixed bug corrupting field settings since WP 5.1 when instructions contain < a target="" >.
  • Fix – Fixed bug in Gutenberg where custom metabox location (acf_after_title) did not show on initial page load.
  • Fix – Fixed bug causing issues when importing/syncing multiple field groups which contain a clone field.
  • Fix – Fixed bug preventing the AMP plugin preview from working.
  • Dev – Added new ‘pre’ filters to get, update and delete meta functions.
  • i18n – Update Turkish translation thanks to Emre Erkan.

5.7.12

Release Date – 15 February 2019

  • Fix – Added missing function register_field_group().
  • Fix – Fixed PHP 5.4 error “Can’t use function return value in write context”.
  • Fix – Fixed bug causing wp_options values to be slashed incorrectly.
  • Fix – Fixed bug where “sync” feature imported field groups without fields.
  • Fix – Fixed bug preventing get_field_object() working with a field key.
  • Fix – Fixed bug causing incorrect results in get_sub_field().
  • Fix – Fixed bug causing draft and preview issues with serialized values.
  • Fix – Fixed bug causing reversed field group metabox order.
  • Fix – Fixed bug causing incorrect character count when validating values.
  • Fix – Fixed bug showing incorrect choices for post_template location rule.
  • Fix – Fixed bug causing incorrect value retrieval after switch_to_blog().
  • i18n – Updated Persian translation thanks to Majix.

5.7.11

Release Date – 11 February 2019

  • New – Added support for persistent object caching.
  • Fix – Fixed PHP error in determine_locale() affecting AJAX requests.
  • Fix – Fixed bug affecting dynamic metabox check when selecting “default” page template.
  • Fix – Fixed bug where tab fields did not render correctly within a dynamic metabox.
  • Tweak – Removed language fallback from “zh_TW” to “zh_CN”.
  • Dev – Refactored various core functions.
  • Dev – Added new hook variation functions acf_add_filter_variations() and acf_add_action_variations().
  • i18n – Updated Portuguese language thanks to Pedro Mendonça.
  • i18n – Updated German translation thanks to Ralf Koller.
  • i18n – Updated Swiss German translation thanks to Raphael Hüni.

5.7.10

Release Date – 16 January 2019

  • Fix – Fixed bug preventing metaboxes from saving if validation fails within Gutenberg.
  • Fix – Fixed bug causing unload prompt to show incorrectly within Gutenberg.
  • Fix – Fixed JS error when selecting taxonomy terms within Gutenberg.
  • Fix – Fixed bug causing jQuery sortable issues within other plugins.
  • Tweak – Improved loading translations by adding fallback from region to country when .mo file does not exit.
  • Tweak – Improved punctuation throughout admin notices.
  • Tweak – Improved performance and accuracy when loading a user field value.
  • Dev – Added filter ‘acf/get_locale’ to customize the locale used to load translations.
  • Dev – Added filter ‘acf/allow_unfiltered_html’ to customize if current user can save unfiltered HTML.
  • Dev – Added new data storage functions acf_register_store() and acf_get_store().
  • Dev – Moved from .less to .scss and minified all css.
  • i18n – Updated French translation thanks to Maxime Bernard-Jacquet.
  • i18n – Updated Czech translation thanks to David Rychly.

5.7.9

Release Date – 17 December 2018

  • Fix – Added custom metabox location (acf_after_title) compatibility with Gutenberg.
  • Fix – Added dynamic metabox check compatibility with Gutenberg.
  • Fix – Fixed bug causing required date picker fields to prevent form submit.
  • Fix – Fixed bug preventing multi-input values from saving correctly within media modals.
  • Fix – Fixed bug where acf_form() redirects to an incorrect URL for sub-sites.
  • Fix – Fixed bug where breaking out of a sub have_rows() loop could produce undesired results.
  • Dev – Added filter ‘acf/connect_attachment_to_post’ to prevent connecting attachments to posts.
  • Dev – Added JS filter ‘google_map_autocomplete_args’ to customize Google Maps autocomplete settings.

5.7.8

Release Date – 7 December 2018

  • Fix – Fixed vulnerability allowing author role to save unfiltered HTML values.
  • Fix – Fixed all metaboxes appearing when editing a post in WP 5.0.
  • i18n – Updated Polish translation thanks to Dariusz Zielonka.
  • i18n – Updated Czech translation thanks to Veronika Hanzlíková.
  • i18n – Update Turkish translation thanks to Emre Erkan.
  • i18n – Updated Portuguese language thanks to Pedro Mendonça.

5.7.7

Release Date – 1 October 2018

  • Fix – Fixed various plugin update issues.
  • Tweak – Added ‘language’ to Google Maps API url.
  • Dev – Major improvements to the acf.models.Postbox model.
  • Dev – Added JS filter ‘check_screen_args’.
  • Dev – Added JS action ‘check_screen_complete’.
  • Dev – Added action ‘acf/options_page/submitbox_before_major_actions’.
  • Dev – Added action ‘acf/options_page/submitbox_major_actions’.
  • i18n – Updated Portuguese language thanks to Pedro Mendonça

5.7.6

Release Date – 12 September 2018

  • 修复 – 修复了卸载提示不起作用的问题。
  • 开发 – 减少填充关系字段分类法过滤器所需的查询数量。
  • 开发 – 向get_field_groups()查询添加了“ nav_menu_item_id”和“ nav_menu_item_depth”。
  • 开发 – 重新排序了各种操作和过滤器,以提高实用性。
  • 国际化(i18n) – 感谢Dariusz Zielonka更新了波兰语

View the full changelog