高级自定义字段(ACF)

描述

高级自定义字段(ACF®)通过为您提供所有使用数据的工具来将WordPress站点转变为一个成熟的内容管理系统。

使用 ACF 插件完全控制您的 WordPress 编辑屏幕、自定义字段数据等。

按需添加字段。
ACF 字段生成器使您只需单击几个按钮即可快速轻松地将字段添加到 WP 编辑屏幕!无论是简单的事情(例如向书评文章添加「作者」字段),还是更复杂的事情(例如电子商务网站或市场的结构化数据需求),ACF 都可以轻松地将字段添加到内容模型中。

将它们添加到任何地方。
可以在整个 WordPress 中添加字段,包括文章、页面、用户、分类术语、媒体、评论甚至自定义选项页面!为 WordPress 内容创建体验带来结构再简单不过了。

到处展示它们。
使用我们无忧、开发人员友好的功能在任何主题模板文件中加载并显示您的自定义字段值!无论您需要显示单个值还是基于更复杂的查询生成内容,ACF 的开箱即用功能都使模板成为各种经验水平的开发人员的梦想。

任何内容,快速。
将 WordPress 转变为真正的内容管理系统不仅仅是自定义字段。创建新的自定义文章类型和分类法是构建自定义 WordPress 网站的重要组成部分。现在可以在 ACF UI 中注册文章类型和分类法,从而加快内容建模工作流程,而无需触摸代码或使用其他插件。

简单美丽且有意为之。
对于内容创建者和负责数据输入的人员来说,现场用户体验非常直观,同时又完美地融入了本机 WordPress 体验。定期审查和应用无障碍标准,确保 ACF 能够为尽可能接近的任何人提供帮助。

文档和开发人员指南。
十多年充满活力的社区贡献以及对清晰文档的持续承诺意味着您将能够找到构建您想要的内容所需的指导。

功能

  • 使用方式简单直觉
  • 功能强大
  • 30 多种字段类型
  • 完整的在线说明文档
  • 数百万用户

相关链接

付费 PRO 版

高级自定义字段插件还提供专业版本,其中包括更多字段、更多功能和更大灵活性。 ACF PRO 插件特点:

升级到 ACF PRO

屏幕截图

  • 简单直观

  • 专为开发者打造

  • 关于字段的所有信息

  • 注册自定义文章类型

  • 注册分类法

安装

从 WordPress 网站管理后台进行安装

  1. 访问 [插件] > [安装插件] 页面。
  2. 搜索「Advanced Custom Fields」或者 “ACF”。
  3. 在 [插件] 页面中安装并启用 Advanced Custom Fields。
  4. 点击新菜单项“ACF”并创建您的第一个自定义字段组,或注册自定义文章类型或分类法。
  5. 阅读开始使用

常见问题

插件开发者能为用户提供的技术支持有哪些?

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

评价

2025 年 11 月 26 日
This is the plugin that takes your site from a 0 to 1. If used correctly, it will make maintenance and development 10x faster. Start with the free version and once youve got a handle, upgrade to the Pro as soon as you can.
2025 年 11 月 21 日
This is not a legit way to proceed. ACF it’s been around for years and that feels like stealing the work of many developers. There should be a judge through a legal proceedure who, after listening to all the parts, decides what to do. I am not happy about this impulsive move from WordPress. Edit: changing my review to 5 stars since SCF is gone and ACF is back
2025 年 11 月 6 日
I used to use this beautiful free plugin called Magic Fields many years ago on my websites. I just decided to relaunch some of them and to my dismay found out Magic Fields has been discontinued. Saw ACF was the alternative but sadly it’s basically useless unless you pay a subscription. Did some more digging and realized Secure Custom Fields was launched by Wordpress itself, is totally free and basically includes this functionality (Which should have been a part of Wordpress from the start).
2025 年 10 月 25 日 1 回复
It’s a great plug-in overall but unfortunately if you don’t renew your yearly subscription then you have to go to every one of your sites and re-enter the key otherwise it shows that the key is no longer valid. It’s a different key as well. Everything keeps working but it feels to me like they’re punishing me and trying to get all of my users to purchase a new copy. Other plugins re-activate and everything works fine so I feel it’s not that they can’t do it it’s that they’re not doing it. This is just my opinion though, I could be wrong
2025 年 9 月 11 日 1 回复
ACF has been ignoring a critical bug with ACF Blocks inside Patterns for over 4 months now. Dozens of developers (myself included) reported that patterns with ACF blocks can’t be edited since WordPress 6.8, but there’s still no fix, no ETA, just vague promises and poor workarounds. For a paid plugin, this level of support is unacceptable — it feels like development has stalled and important issues are simply brushed aside.
阅读所有1,420条评价

贡献者及开发者

「高级自定义字段(ACF)」是开源软件。 以下人员对此插件做出了贡献。

贡献者

「高级自定义字段(ACF)」插件已被翻译至 34 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「高级自定义字段(ACF)」翻译成简体中文。

对开发感兴趣吗?

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

更新日志

6.7.0

Release Date 3rd December 2025

  • View Release Post
  • New – ACF Blocks V3 now supports Inline Editing – edit your block content directly in place, right inside the editor. Just opt in to enable it.
  • Enhancement – Accordion field accessibility improvements
  • Enhancement – Google Maps field accessibility improvements
  • Enhancement – Styling improvements to the V3 Blocks expanded editor
  • Fix – V3 ACF Blocks validation now clears properly when more than one block is in the editor.
  • Fix – Relationship, Post Object, and Page Link fields now sort posts correctly on WordPress 6.8+
  • Fix – List tables now respect the convert_field_name_to_lowercase javascript filter
  • Fix – WYSIWYG field on attachment pages no longer sends ajax on every keystroke

6.6.2

Release Date 29th October 2025

  • Enhancement – Added a new convert_field_name_to_lowercase JS filter to allow uppercase letters in ACF field names
  • Enhancement – The form for V3 Blocks can now be optionally hidden from the sidebar via a new hideFieldsInSidebar setting in block.json
  • Enhancement – V3 Blocks now display an “Open Expanded Editor” button in the sidebar for easier access to the full edit form
  • Fix – The buttons to reorder ACF metaboxes are no longer hidden for metaboxes in the block editor sidebar
  • Fix – V3 Blocks now display a fallback message when the block preview can’t be rendered due to invalid HTML being used in field values
  • Fix – V3 Blocks no longer show a loading spinner when preloaded
  • Fix – V3 Blocks now save default field values even if the block wasn’t interacted with before saving
  • Fix – Pressing CMD/CTRL + Z no longer causes the fields to disappear in V3 Blocks
  • Fix – The form for V3 Blocks now opens on the left side in RTL languages

6.6.1

Release Date 16th October 2025

  • Fix – The Color Picker palette now displays correctly with a larger number of custom palette colors
  • Fix – The WYSIWYG field no longer displays an extra textarea in ACF Blocks
  • Fix – The type signature of the ACF Blocks render function now matches prior to 6.6, resolving potential type hinting errors
  • Fix – V3 Blocks now correctly update the block preview when changing text controls
  • Fix – V3 Blocks now work correctly in the Widget block editor
  • Fix – V3 Blocks no longer render an extra hidden div into the block editor
  • Fix – Fields on V3 blocks now consistently render properly when switching between “Post” and “Block” view in the sidebar

6.6.0

Release Date 7th October 2025

  • View Release Post
  • New – ACF Blocks Version 3 supports WordPress Block API Version 3
  • New – ACF now requires WordPress version 6.2 or newer
  • Enhancement – Field Groups can now have a separate Display Title
  • Enhancement – Accessibility improvements for button groups, checkbox, radio, and image field types
  • Enhancement – Color Picker field can now use a custom palette or use theme.json colors as the palette
  • Enhancement – ACF admin notices now use WordPress core styles again
  • Enhancement – The Flexible Content “Delete Layout” and “Rename Layout” modals now display correctly on mobile
  • Fix – Blocks V3: You can now edit ACF blocks in Edit mode inside WP Core’s pattern editor
  • Fix – Blocks V3: Validation errors now first appear after you click “Save/publish”, as opposed to immediately, while you are typing into a field for the first time
  • Fix – Blocks V3: After fixing a field validation error it shows as fixed immediately as opposed to needing to click out of the block and back into it
  • Fix – Blocks V3: Blocks with radio buttons no longer affect each other’s field values
  • Fix – Blocks V3: Blocks with required radio buttons now validate correctly
  • Fix – Blocks V3: ACF field validation now works in the Site Editor
  • Fix – Blocks V3: WYSIWYG fields are no longer affected by typing into other blocks
  • Fix – New field names are lowercase only
  • Fix – Icon Picker now enforces required validation
  • Fix – Calls to jQuery’s deprecated focus function have been updated to use the trigger function
  • Fix – Layouts inside cloned Flexible Content fields can now be disabled and renamed
  • i18n – Updated PRO Japanese translations (props danielkun)

6.5.1

Release Date 10th September 2025

  • Enhancement – The Flexible Content “Expand All” and “Collapse All” button now appear correctly on mobile
  • Enhancement – The Flexible Content delete layout button is now back in the main layout header, making it easier to delete layouts
  • Enhancement – The JSON import tool now limits the selectable files to JSON files
  • Fix – Disabled Flexible Content layouts are no longer counted towards min/max layout validation
  • Fix – The top “Add Row” button for layouts is now disabled when layouts have reached the max layouts validation
  • Fix – The per-layout “Add Row” and “Duplicate Layout” buttons are now disabled when layouts have reached the max layouts validation
  • Fix – Disabling Flexible Content layouts no longer disables layouts in cloned Flexible Content fields using a different post ID on the same page
  • Fix – Flexible Content “Add Layout” menu is no longer hidden by some field types
  • Fix – Flexible Content layout names can now allow some safe HTML
  • Fix – When creating a temporary post type during import, ACF now correctly sets the ACF post type, rather than defaulting to post
  • Fix – ACF PRO updates are now shown even when no other plugins have an update available

6.5.0.1

Release Date 12th August 2025
PRO Only Release

  • Fix – Flexible Content layouts configured with a “Layout” setting of “Table” are now rendered correctly in the post editor
  • Fix – Flexible Content “Add Layout” buttons now insert the new layout in the correct position
  • Fix – Long Flexible Content layout names no longer extend outside of the “Add Layout” dropdown

6.5.0

Release Date 11th August 2025

  • New – Flexible Content layouts can now be renamed in the post editor, giving content editors better clarity when managing layouts
  • New – Flexible Content layouts can now be disabled, preventing them from rendering on the frontend without needing to delete their data
  • New – Flexible Content layouts can now be collapsed and expanded in bulk for faster content editing
  • New – Editing a Flexible Content layout now highlights the layout being edited, making it easier to identify
  • New – The Date and Date Time Picker fields can now be configured to default to the current date
  • Fix – Custom Icon Picker tabs now work correctly when used inside an ACF Block
  • Fix – Duplicating a Field Group no longer causes a fatal error when using Russian translations
  • Fix – ACF classes no longer use dynamic class properties, improving compatibility with PHP 8.2+
  • Fix – ACF PRO no longer shows an update available immediately after updating to the latest version
  • Fix – Field group metabox collapse and expand buttons are no longer misaligned in the post editor
  • Fix – The ACF Site Health section no longer causes a PHP warning when field group location rules are incomplete
  • Security – HTML is now escaped from field validation errors and tooltips

6.4.3

Release Date 22nd July 2025

  • Security – Unsafe HTML in field group labels is now correctly escaped for conditionally loaded field groups, resolving a JS execution vulnerability in the classic editor
  • Security – HTML is now escaped from field group labels when output in the ACF admin
  • Security – Bidirectional and Conditional Logic Select2 elements no longer render HTML in field labels or post titles
  • Security – The acf.escHtml function now uses the third party DOMPurify library to ensure all unsafe HTML is removed. A new esc_html_dompurify_config JS filter can be used to modify the default behaviour
  • Security – Post titles are now correctly escaped whenever they are output by ACF code. Thanks to Shogo Kumamaru of LAC Co., Ltd. for the responsible disclosure
  • Security – An admin notice is now displayed when version 3 of the Select2 library is used, as it has now been deprecated in favor of version 4

6.4.2

Release Date 20th May 2025

  • New – In ACF PRO, fields can now be added to WooCommerce Subscriptions when using HPOS
  • Security – Changing a field type no longer enables the “Allow Access to Value in Editor UI” setting
  • Fix – Paginated Repeater fields no longer save duplicate values when saving to a WooCommerce Order with HPOS disabled
  • Fix – Blocks registered via acf_register_block_type() with a parent value of null no longer fail to register

6.4.1

Release Date 8th May 2025

  • New – Select fields can now be configured to allow creating new options when editing the field’s value (requires the “Stylized UI” and “Multiple” field settings to be enabled)
  • Enhancement – The “Escaped HTML” warning notice introduced in ACF 6.2.5 is now disabled by default
  • Enhancement – The Icon Picker field now supports supplying an array of icons to a custom tab via a new acf/fields/icon_picker/{tab_name}/icons filter
  • Fix – ACF Blocks are now forced into preview mode when editing a synced pattern
  • Fix – The free ACF plugin once again works with the Classic Widgets plugin and the legacy ACF Options Page addon
  • Fix – ACF no longer causes an infinite loop in bbPress when editing replies

6.4.0.1

Release Date 8th April 2025

  • Fix – Calling acf_get_reference() with an invalid field name no longer causes a fatal error

6.4.0

Release Date 7th April 2025

  • New – In ACF PRO, fields can now be added to WooCommerce orders when using HPOS
  • Enhancement – ACF now uses Composer to autoload some classes
  • Fix – Repeater pagination now works when the Repeater is inside a Group field
  • Fix – Various translations are no longer called before the WordPress init action hook
  • Security – Link field no longer has a minor local XSS vulnerability
  • i18n – Various British English translation strings no longer have a quoting issue breaking links
  • i18n – Added Dutch (formal) translations (props @toineenzo)

6.3.12

发布日期 2025年1月21日

  • 增强 – 当现场验证失败时发生的错误消息现在不足的安全性nonce现在有其他上下文
  • 修复 – 重复的ACF块在启用块预加载后初始保存后不再丢失其现场值
  • 修复 – 启用React Strictmode时,包含复杂字段类型的ACF块现在正确行为

6.3.11

发布日期 2024 年 11 月 12 日

  • 增强功能 – 点击后可复制字段组键值
  • 修复 – 通过条件逻辑隐藏字段的中继表现在可正确呈现
  • 修复 – ACF 块现在可在 React StrictMode 中正确运行
  • 修复:WordPress 块应用程序接口版本为 3 的 ACF 块不再提供编辑模式,因为 iframe 中不支持字段编辑。

6.3.10.2

发布日期 2024 年 10 月 29 日
仅免费发布

  • 修复 – 当任何不支持的传统 ACF 附加组件处于活动状态时,ACF Free 不再导致致命错误

6.3.10.1

发布日期 2024 年 10 月 29 日
仅免费发布

  • 修复 – 当 WPML 处于活动状态时,ACF Free 不再导致致命错误

6.3.10

发布日期 2024 年 10 月 29 日

  • 安全性 – 现在,为自定义文章类型和分类法设置元宝回调需要管理员身份,多站点安装则需要超级管理员身份
  • 安全性 – 字段特定的 ACF nonces 现在有了前缀,解决了第三方 nonces 在 AJAX 调用中可能被视为有效的问题
  • 增强功能 – 在编辑字段组时,新增了「关闭并添加字段」选项,可在编辑字段后插入一个新字段
  • 增强功能 – ACF 和 ACF PRO 现在共享相同的插件更新程序,以提高可靠性和性能
  • 修复 – 导出包含元框回调的文章类型和分类法现在可正确导出用户定义的回调

6.3.9

发布日期 2024年10月15日

  • 安全性 – 在字段组编辑器中编辑 ACF 字段不再执行存储的 XSS 漏洞。感谢来自 Viettel Cyber Security 的 Duc Luong Tran (janlele91) 负责披露
  • 安全性–文章类型和分类元方框回调不再能够访问任何超全局值,从而进一步加强了 6.3.8 中的原始修复。
  • 修复–在块编辑器中使用并附加到侧边栏的 ACF 字段现在可正确验证。

6.3.8

发布日期 2024 年 10 月 7 日

  • 安全性 – ACF 定义的「文章类型」和「分类法元框」回调不再能够访问 $_POST 数据。(感谢 Automattic 安全团队的披露)

6.3.7

发布日期 2024 年 10 月 2 日

  • 安全性 – ACF现在使用WP发动机服务器中自己的更新机制

6.3.6

发布日期 2024 年 8 月 28 日

  • 安全性 – 新添加的字段现在必须明确设置为允许在内容编辑器中访问(使用 ACF 短代码或块绑定时),以提高字段权限的安全性。更多详情请参见发布说明
  • 安全修复 – 在字段组编辑器中呈现字段标签时,现在会正确转义,以防止潜在的 XSS 问题。感谢 Mitsui Bussan Secure Directions, Inc.
  • 修复 – 验证和阻止 AJAX 请求的非ces 不再被第三方插件覆盖
  • 修复 – 检测第三方 select2 库时现在默认使用 v4 而不是 v3
  • 修复 – 如果未找到渲染模板 PHP 文件,区块预览现在会显示错误

6.3.5

发布日期 2024 年 8 月 1 日

  • 修复 – ACF 快捷代码现在可正确输出以逗号分隔的数组值列表
  • 修复 – 在自动模式下渲染的 ACF 块现在可在编辑字段后正确重新渲染其预览效果
  • 修复 – 如果 HTML 在呈现时会自动选择第一个值,ACF 块验证将不再引发必填验证信息
  • 修复 – 如果默认值将呈现为字段值,ACF 块验证不再引发必填验证信息
  • 修复 – 添加新块时,ACF 块验证不再为条件逻辑隐藏的字段引发必填验证信息

6.3.4

发布日期 2024 年 7 月 18 日

  • 安全修复 – ACF 简码现在默认防止访问来自不同私人文章的字段。查看 发布说明 了解更多信息
  • 修复 – 没有 edit_posts 功能但具有编辑自定义文章类型自定义功能的用户,现在可以正确加载通过条件位置规则加载的字段组
  • 修复 – 块验证不再在页面加载时验证字段的子字段,仅在编辑时验证。这解决了页面加载时或首次添加块时不一致的验证错误问题。
  • 修复 – 即使服务器调用失败,停用 ACF PRO 许可证现在也会删除许可证密钥
  • 修复:通过the_fieldthe_sub_field或 ACF 短代码输出时,或通过设置了 escape html 参数的 get_ 函数检索时,返回对象的字段类型不再导致 PHP 警告和错误。
  • 修复:块渲染过程中出现服务器端错误时,编辑器会优雅地显示错误信息

6.3.3

发布日期 2024 年 6 月 27 日

  • 增强功能 – 所有破折号现在都可用于图标选择器字段类型
  • 修复 – 在使用风格化用户界面设置时,”真/假 “字段现在能正确显示开关旁的说明信息
  • 修复 – 通过 AJAX 加载时,条件逻辑值现在可正确加载选项
  • 修复 – ACF PRO 在加载前端页面时不再触发许可证验证调用
  • i18n – 修复了选项页面预览中的一个不可翻译字符串

6.3.2.1

发布日期2024年6月24日
Pro仅发行

  • 修复 – 通过 AJAX 获取 ACF 块时不再触发 JavaScript 错误

6.3.2

发布日期 2024 年 6 月 24 日

  • 安全修复 – ACF 现在可为每个启用 AJAX 的字段生成不同的非ces,从而防止订阅者或前端表单用户查询其他字段的结果
  • 安全修复 – ACF 现在可正确验证某些仅限编辑器操作的权限,防止订阅者执行这些操作
  • 安全修复 – 废弃了传统的私有内部字段类型(输出),以防止其输出不安全的 HTML
  • 安全修复 – 改进了对某些 SQL 过滤器和其他内部函数的处理,以确保输出始终正确转义
  • 安全修复 – ACF 现在在所有文件夹中包含空白的 index.php 文件,以防止在配置不正确的网络服务器上列出 ACF 插件文件夹的目录。

6.3.1.2

发布日期 2024 年 6 月 6 日
仅限专业版

  • 修复 – 部件区域中的 ACF 块在无上下文可用时不再导致致命错误
  • 修复 – 未指定字段的 ACF 块不再在侧边栏显示表单的位置出现空隙

6.3.1.1

发布日期 2024 年 6 月 6 日
仅限专业版

  • 修复 – 复制或删除包含图标选取器子字段的行时,中继器和灵活内容字段不再出错
  • 修复 – 包含灵活内容字段的 ACF 块现在可正确加载其编辑表单
  • 修复 – ACF 块不再存在读取数据存储时未初始化的竞赛条件
  • 修复 – ACF 块在没有字段和空无字段信息的情况下不再触发 JS 错误
  • 修复 – ACF 块预加载现在可正确用于使用自定义块上下文的字段
  • 修复 – ACF 块 JavaScript 调试信息现在可在 SCRIPT_DEBUG 为 true 时正确显示

6.3.1

发布日期 2024 年 6 月 4 日

  • 增强功能 – 在用户界面中注册的选项页现在可以复制了
  • 修复 – ACF 块验证现在可正确验证中继器、组和灵活内容字段
  • 修复 – ACF 块验证现在可在字段使用非默认返回类型时正确验证
  • 修复 – 在字段组之间移动的字段现在可正确更新两个 JSON 文件
  • 修复 – 使用左对齐标签时,图标选取器字段现在可正确呈现
  • 修复 – 如果只选择显示一个选项卡,图标选取器字段不再显示选项卡
  • 修复 – 如果没有选择显示图标选取器选项卡,图标选取器字段不再会导致文章编辑器崩溃
  • 修复 – “真/假 “字段现在能更好地处理较长的 “开/关 “标签
  • 修复 – 通过 AJAX 加载的多选分类字段的 Select2 结果不再对 HTML 实体进行双重编码

6.3.0.1

发布日期 2024 年 5 月 22 日

  • 修复 – ACF PRO 用户在新的网站健康功能中不再出现可能的致命错误
  • 修复 – ACF PRO 用户的 ACF 块中不再出现可能的未定义索引错误

6.3.0

发布日期 2024 年 5 月 22 日

  • 新功能 – ACF 现在需要 WordPress 6.0 或更新版本,以及 PHP 7.4 或更新版本。
  • 新功能 – ACF 块现在支持字段验证规则。查看 发布说明 了解更多信息
  • 新功能 – ACF 块现在支持在 postmeta 表而非文章内容中存储字段数据
  • 新功能 – 字段的条件逻辑规则现在支持为文章对象、页面链接、分类标准、关系和用户选择特定值,而无需输入 ID
  • 新功能 – ACF 和 ACF PRO 的新图标选取器字段类型
  • 新功能–自定义文章类型菜单图标的图标选择
  • 新功能 – 为选项页面菜单图标选择图标
  • 新功能 – ACF 现在可在 WordPress 网站健康区域显示调试和状态信息
  • 新功能 – 逃逸的 html 通知现在可被永久驳回
  • 增强功能 – 标签字段现在支持 selected 属性,可指定默认选择哪个标签,并支持类属性
  • 修复:区块预载现在可在 WordPress 6.5 或更新版本中可靠运行
  • 修复 – 通过 AJAX 加载的文章对象字段的 Select2 结果不再对 HTML 实体进行双重编码
  • 修复 – 使用 ACF 注册的自定义文章类型现在将默认启用自定义字段支持,以更好地支持修订
  • 修复 – 在经典编辑器中发布文章后的首次预览现在可正确显示 ACF 字段
  • 修复 – ACF 字段和 “灵活内容 “布局现在可在拖动时正确定位
  • 修复 – 在 “灵活内容 “布局内复制字段标题时,不再为复制值添加空格
  • 修复 – 编辑时,”灵活内容 “布局名称不再转换为小写字母
  • 修复 – 具有无默认属性的 ACF 块现在可正确注册
  • 修复 – 如果生成的非密钥只包含数字,加载结果时用户字段不再触发 404
  • 修复 – ACF 项目的描述字段现在仅支持数字字符
  • 修复 – 在小屏幕上,字段组标题不再出现在 WordPress 管理菜单上方
  • 修复:acf/json/save_file_name过滤器现在可在删除 JSON 文件时正确应用。
  • i18n – ACF PRO 许可证或更新检查期间出现的所有错误现在均可翻译
  • 其他 – 正如ACF 6.2.7 发布说明中所讨论的,ACF 的新安装默认禁用 ACF 短代码。

6.2.10

发布日期 2024 年 5 月 15 日

  • 安全修复 – ACF 块不再允许在块的属性中重写呈现模板、呈现或资产回调。有关详细信息,请阅读发布博文

6.2.9

发布日期 2024 年 4 月 8 日

  • 增强功能 – 在初始化自定义 Select2 时,现在可以重写 Select2 的 escapeMarkup 函数。
  • 修复 – 在使用有条件加载的字段组时,”在屏幕上隐藏 “设置现在会正确应用
  • 修复 – 编辑名称时,字段名不再转换为小写字母
  • 修复 – 字段组标题不再将 HTML 实体转换为其编码形式

6.2.8

发布日期 2024 年 4 月 2 日

  • 新功能 – 通过新的 acf/field 源支持 WordPress 6.5 中的块绑定 API。有关如何使用的详细信息,请阅读发布博文
  • 新功能 – 支持在 WordPress 6.5 中提高翻译性能
  • 增强功能 – 新的 JS 筛选器 select2_escape_markup 现在允许字段自定义 select2 的 HTML 转义行为
  • 修复 – 选项页面无法再设置为其父级页面
  • 修复 – 多网站子网站安装上的 ACF PRO 许可证激活现在将使用正确的网站 URL
  • 修复 – 当更新页面不可见时,安装在多站点安装上的 ACF PRO 将不再尝试检查更新,从而导致 404 错误
  • 修复 – 找不到 ACF JSON 文件夹时,ACF JSON 不再在 Windows 服务器上产生警告
  • 修复 – 字段和布局名称现在可以包含有效的非 ASCII 字符
  • 其他 – ACF PRO 现在需要激活有效许可证才能使用 PRO 功能。了解更多

6.2.7

发布日期 2024 年 2 月 27 日

  • 安全修复 – 自 ACF 6.2.5 起,the_field 现在可转义可能不安全的 HTML。有关详细信息,请阅读 发布博文
  • 安全修复 – 字段和布局名称现在只能使用字母数字字符,从而解决了潜在的 XSS 问题
  • 安全修复 – select2 字段的默认呈现模板不再允许呈现 HTML,从而解决了潜在的 XSS 问题
  • 安全性增强 – 现在可使用 acf/shortcode/prevent_access 过滤器来限制允许 ACF 短代码访问的数据。
  • 安全性增强 – i18n 翻译字符串现在可在输出时转义
  • 增强功能 – ACF 现在普遍使用 WordPress 文件系统函数而不是本机 PHP 函数

6.2.6.1

发布日期:2024年2月7日

  • 修复:安装 Yoast 或其他加载块编辑器组件的插件后,在经典编辑器中编辑字段时不再出现致命的 JS 错误
  • 修复:在数组返回字段类型的获取函数上使用 $escape_html 不再产生数组到字符串的转换错误

6.2.6

发布日期 – 2024年2月6日

  • 增强功能 – get_field() 和其他 get_ 函数现在支持返回 HTML 安全字段值的 escape_html 参数。
  • 增强功能 – 在返回 HTML 安全值时,URL 字段将使用 esc_url 而不是 wp_kses_post 转义。
  • 修复 – ACF 字段现在可以正确保存到 WordPress 创建的修订版中,解决了 WordPress 6.4 或更新版本中草稿预览的问题。
  • 修复 – 在 ACF PRO 许可证允许的情况下,多站点子站点现在将由主站点正确激活,从而隐藏这些子站点上的更新页面
  • 修复 – required 属性不起作用的字段类型(如选项卡或手风琴)将不再显示该选项
  • 修复 – 复制字段组现在可保持当前显示的字段组页面
  • 修复 – 混合主题中处于编辑模式的 ACF 块中的字段现在将使用 ACF 的样式,而不是由主题覆盖某些属性
  • 修复 – 某些管理通知中的文字不再与解散按钮重叠
  • 修复:现在禁止将 link 用作 CPT 名称,以避免 WordPress 核心冲突
  • 修复 – 灵活内容布局的重复次数不再超过其最大数量限制
  • 修复 – ACF 管理屏幕外显示的所有 ACF 通知现在都以插件名称为前缀
  • 修复 – ACF 不再检查<PHP7 是否需要多补丁,多补丁已被移除

6.2.5

发布日期 2024 年 1 月 16 日

  • 安全修复 – ACF 短代码现在将通过 wp_kses 运行所有输出,以转义不安全的 HTML。这可能会对您的网站造成影响,但出于安全考虑是必需的,如果您受到影响,WordPress 管理程序中将显示一条信息。更多信息请参阅有关此版本的博文。感谢 Francesco Carlucci 通过 Wordfence 负责任地披露此信息。
  • 安全性 – ACF 现在会通过管理员消息发出警告,当即将对 the_fieldthe_sub_field 进行更改时,可能需要对您的网站进行主题更改,以避免剥离不安全的 HTML。有关详细信息,请参阅此版本的博文
  • 安全性 – 在即将发布的 ACF 中,在使用 the_fieldthe_sub_field 时,用户可通过新过滤器 acf/the_field/escape_html_optin 选择自动转义不安全的 HTML。

6.2.4

<em>发布日期:2023年11月28日</em>

  • 修复 – 自定义文章类型标签现在与 WordPress 6.4 中 “添加新内容 “标签的行为一致
  • 修复 – 将文章类型和分类标准导出为 PHP 时,分类标准现在将出现在文章类型之前,与 ACF 注册它们的顺序相匹配。这解决了分类词缀在文章类型永久链接中不起作用的问题。
  • 修复 – 分类标准、文章类型或选项页面的高级设置现在在切换为 “打开 “时以正确的顶部填充显示
  • 修复 – 当父选项页面设置为 “重定向到子页面 “时,子页面现在将正确显示其父设置
  • 修复 – 当作为必须使用的插件激活时,ACF PRO “更新 “页面现在可见。使用现有的 show_updates 设置来隐藏
  • 修复 – 当作为必须使用的插件激活时,代码中定义的 ACF PRO 许可证现在可正确激活网站
  • 修复 – 当 show_updates 被设置或过滤为 false 时,ACF PRO 现在仍会自动激活已定义的许可证。
  • i18n – ACF PRO 激活服务器发送的维护和内部上游消息现在可进行翻译

6.2.3

发布日期 2023 年 11 月 15 日

  • 查看发布文章
  • 新功能 – ACF 块专用的 block.json JSON 模式现已在 GitHub 上提供。
  • 新功能 – 灵活内容字段现在可在布局标题栏中显示布局名称,并支持点击复制
  • 新功能 – 复制 “灵活内容 “布局时,现在会在其名称和标签上附加 “复制 “字样,这与字段组复制的行为相匹配
  • 增强功能 – 当网站 URL 发生变化(如网站迁移后)时,ACF PRO 现在会自动尝试重新激活许可证。这解决了更新可能失败的问题
  • 增强功能–字段组 “高 “位置的演示文稿设置明确说明块编辑器不支持该设置
  • 修复:acf_format_date 现在可确保日期参数有效,以防止在传入其他数据类型时出现致命错误。
  • 修复 – 带有自定义图标 URL 的 CPT 现在会在字段组屏幕的位置栏中显示文章图标
  • 修复 – ACF JSON 导入表单现在将在首次提交时禁用,从而解决了可提交两次表单的问题
  • 修复 – 使用嵌套布局时,”灵活内容 “字段中的 “添加行 “按钮现在可正确显示
  • 修复 – ACF 管理页面加载时警告和错误提示不再闪烁
  • i18n – ACF PRO 许可证激活成功和错误信息现在可翻译

6.2.2

发布日期 2023年10月25日

  • 增强功能 – 编辑器尚未初始化的 ACF 块现在可正确呈现
  • Enhancement – Added a new acf/filesize filter to allow third party media plugins to bypass ACF …