Compare commits

..

14 Commits

Author SHA1 Message Date
ACF edf1bac99d Updates to 6.7.0.2 2025-12-12 10:25:59 +00:00
ACF d6a46976ef Updates to 6.7.0.1 2025-12-11 10:26:51 +00:00
ACF fca2af463e Updates to 6.7.0 2025-12-04 10:26:55 +00:00
ACF 28183c4288 Updates to 6.6.2 2025-10-30 10:22:00 +00:00
ACF b52f0cd3ba Updates to 6.6.1 2025-10-17 10:21:36 +00:00
ACF edcc0c871f Updates to 6.6.0 2025-10-08 10:20:47 +00:00
ACF ed376e7d24 Updates to 6.5.1 2025-09-11 10:19:43 +00:00
ACF 7cb32137bc Updates to 6.5.0.1 2025-08-13 10:24:10 +00:00
ACF f9339e6c62 Updates to 6.5.0-RC1 2025-07-31 10:25:30 +00:00
ACF 159a580148 Updates to 6.4.3 2025-07-23 10:24:59 +00:00
ACF 0e92288e89 Updates to 6.4.2 2025-05-21 10:22:19 +00:00
ACF 6d124e29a6 Updates to 6.4.1 2025-05-09 10:21:14 +00:00
ACF 3d8015189f Updates to 6.4.0.1 2025-04-09 10:23:24 +00:00
ACF cb9cd3202f Updates to 6.4.0-RC1 2025-03-11 10:20:42 +00:00
378 changed files with 90436 additions and 73989 deletions

27
README.md Normal file
View File

@ -0,0 +1,27 @@
# Advanced Custom Fields
Welcome to the official Advanced Custom Fields repository on GitHub. ACF is a WordPress plugin used to take full control of your edit screens & custom field data.
## Documentation
Do you need help getting started with ACF, or do you have questions about one of the ACF features? You can [search through our documentation here](https://www.advancedcustomfields.com/resources/). If you don't find the answers you're looking for, you can start a new forum thread in the [support forum](https://support.advancedcustomfields.com/) or contact our [support team](https://www.advancedcustomfields.com/contact/)
If you've got feedback or a feature suggestion for ACF, please use our [feedback board](https://www.advancedcustomfields.com/feedback/)
## Support
This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core issues only.
Support can take place in the appropriate channels:
* Community forum
* Email based ticket system
These channels can be accessed from our [support website](https://support.advancedcustomfields.com/).
## Contributing
If you have a patch, or stumbled upon an issue with ACF core, you can contribute this back to the code. Please create a new github issue with as much information as possible, and a PR if appropriate.
## Translations
If you're looking to translate ACF, you can submit new PRO translations via a PR on this repo. Any strings from the free version are imported from [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/advanced-custom-fields/stable/). For more information, please view our [translation guide](https://www.advancedcustomfields.com/resources/how-to-help-translate-acf-into-other-languages/)

93
acf.php
View File

@ -2,21 +2,31 @@
/**
* Advanced Custom Fields PRO
*
* @package ACF
* @author WP Engine
* @package ACF
* @author WP Engine
*
* @wordpress-plugin
* Plugin Name: Advanced Custom Fields PRO
* Plugin URI: https://www.advancedcustomfields.com
* Description: Customize WordPress with powerful, professional and intuitive fields.
* Version: 6.3.12
* Version: 6.7.0.2
* Author: WP Engine
* Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields
* Update URI: false
* Update URI: https://www.advancedcustomfields.com/pro
* Text Domain: acf
* Domain Path: /lang
* Requires PHP: 7.4
* Requires at least: 6.0
* Requires at least: 6.2
*/
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -28,7 +38,6 @@ if ( ! class_exists( 'ACF' ) ) {
/**
* The main ACF class
*/
#[AllowDynamicProperties]
class ACF {
/**
@ -36,7 +45,7 @@ if ( ! class_exists( 'ACF' ) ) {
*
* @var string
*/
public $version = '6.3.12';
public $version = '6.7.0.2';
/**
* The plugin settings array.
@ -59,6 +68,48 @@ if ( ! class_exists( 'ACF' ) ) {
*/
public $instances = array();
/**
* The loop instance.
*
* @var acf_loop
*/
public $loop;
/**
* The revisions instance.
*
* @var acf_revisions
*/
public $revisions;
/**
* The fields instance.
*
* @var acf_fields
*/
public $fields;
/**
* The form front instance.
*
* @var acf_form_front
*/
public $form_front;
/**
* The validation instance.
*
* @var acf_validation
*/
public $validation;
/**
* The admin tools instance.
*
* @var acf_admin_tools
*/
public $admin_tools;
/**
* A dummy constructor to ensure ACF is only setup once.
*
@ -91,7 +142,7 @@ if ( ! class_exists( 'ACF' ) ) {
// Define settings.
$this->settings = array(
'name' => __( 'Advanced Custom Fields', 'acf' ),
'name' => 'Advanced Custom Fields',
'slug' => dirname( ACF_BASENAME ),
'version' => ACF_VERSION,
'basename' => ACF_BASENAME,
@ -133,6 +184,9 @@ if ( ! class_exists( 'ACF' ) ) {
'enable_meta_box_cb_edit' => true,
);
// Include autoloader.
include_once __DIR__ . '/vendor/autoload.php';
// Include utility functions.
include_once ACF_PATH . 'includes/acf-utility-functions.php';
@ -144,13 +198,22 @@ if ( ! class_exists( 'ACF' ) ) {
// Include classes.
acf_include( 'includes/class-acf-data.php' );
acf_include( 'includes/class-acf-internal-post-type.php' );
acf_include( 'includes/class-acf-site-health.php' );
acf_include( 'includes/fields/class-acf-field.php' );
acf_include( 'includes/locations/abstract-acf-legacy-location.php' );
acf_include( 'includes/locations/abstract-acf-location.php' );
// Initialise autoloaded classes.
new ACF\Site_Health\Site_Health();
// Include functions.
acf_include( 'includes/acf-helper-functions.php' );
acf_new_instance( 'ACF\Meta\Comment' );
acf_new_instance( 'ACF\Meta\Post' );
acf_new_instance( 'ACF\Meta\Term' );
acf_new_instance( 'ACF\Meta\User' );
acf_new_instance( 'ACF\Meta\Option' );
acf_include( 'includes/acf-hook-functions.php' );
acf_include( 'includes/acf-field-functions.php' );
acf_include( 'includes/acf-bidirectional-functions.php' );
@ -232,7 +295,9 @@ if ( ! class_exists( 'ACF' ) ) {
acf_include( 'includes/Updater/init.php' );
// Include PRO if included with this build.
acf_include( 'pro/acf-pro.php' );
if ( ! defined( 'ACF_PREVENT_PRO_LOAD' ) || ( defined( 'ACF_PREVENT_PRO_LOAD' ) && ! ACF_PREVENT_PRO_LOAD ) ) {
acf_include( 'pro/acf-pro.php' );
}
if ( is_admin() && function_exists( 'acf_is_pro' ) && ! acf_is_pro() ) {
acf_include( 'includes/admin/admin-options-pages-preview.php' );
@ -273,6 +338,9 @@ if ( ! class_exists( 'ACF' ) ) {
// Load textdomain file.
acf_load_textdomain();
// Make plugin name translatable.
acf_update_setting( 'name', __( 'Advanced Custom Fields', 'acf' ) );
// Include 3rd party compatiblity.
acf_include( 'includes/third-party.php' );
@ -395,9 +463,8 @@ if ( ! class_exists( 'ACF' ) ) {
*/
do_action( 'acf/include_taxonomies', ACF_MAJOR_VERSION );
// If we're on 6.5 or newer, load block bindings. This will move to an autoloader in 6.4.
if ( version_compare( get_bloginfo( 'version' ), '6.5-beta1', '>=' ) ) {
acf_include( 'includes/Blocks/Bindings.php' );
// If we're on 6.5 or newer, load block bindings.
if ( version_compare( get_bloginfo( 'version' ), '6.5', '>=' ) ) {
new ACF\Blocks\Bindings();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
[data-acf-inline-contenteditable="1"][contenteditable=true]:empty::before{content:attr(data-acf-placeholder);opacity:.62}[data-acf-inline-contenteditable="1"][contenteditable=true]:empty{border:1px dashed rgba(255,0,0,0)}[data-acf-inline-fields-uid]:hover,[data-acf-inline-contenteditable]:hover{outline:2px solid var(--wp-admin-theme-color);outline-offset:2px}.acf-block-has-validation-error{border:2px solid #d94f4f}

View File

@ -1 +1 @@
(()=>{var e;(e=jQuery)(".acf-escaped-html-notice").on("click",".acf-show-more-details",(function(t){t.preventDefault();const c=e(t.target),a=c.closest(".acf-escaped-html-notice").find(".acf-error-details");a.is(":hidden")?(a.slideDown(100),c.text(acf_escaped_html_notice.hide_details)):(a.slideUp(100),c.text(acf_escaped_html_notice.show_details))}))})();
(()=>{var e;(e=jQuery)(".acf-escaped-html-notice").on("click",".acf-show-more-details",function(t){t.preventDefault();const c=e(t.target),a=c.closest(".acf-escaped-html-notice").find(".acf-error-details");a.is(":hidden")?(a.slideDown(100),c.text(acf_escaped_html_notice.hide_details)):(a.slideUp(100),c.text(acf_escaped_html_notice.show_details))})})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{var e={805:()=>{!function(e){const t=function(t){return void 0===t.element?t:t.children&&"None"===t.text?void 0:("acfOptionsPages"===t.text&&(t.text=acf.__("Options Pages")),e('<span class="acf-selection"></span>').data("element",t.element).html(acf.strEscape(t.text)))},a=function(t){if(void 0===t.element)return t;const a=e('<span class="acf-selection"></span>');return a.html(acf.strEscape(t.element.innerHTML)),"options"!==t.id&&"edit_posts"!==t.id||a.append('<span class="acf-select2-default-pill">'+acf.__("Default")+"</span>"),a.data("element",t.element),a};new acf.Model({id:"UIOptionsPageManager",wait:"ready",events:{"change .acf-options-page-parent_slug":"toggleMenuPositionDesc"},initialize:function(){"ui_options_page"===acf.get("screen")&&(acf.newSelect2(e("select.acf-options-page-parent_slug"),{field:!1,templateSelection:t,templateResult:t,dropdownCssClass:"field-type-select-results"}),acf.newSelect2(e("select.acf-options-page-capability"),{field:!1,templateSelection:a,templateResult:a}),acf.newSelect2(e("select.acf-options-page-data_storage"),{field:!1,templateSelection:a,templateResult:a}),this.toggleMenuPositionDesc())},toggleMenuPositionDesc:function(t,a){"none"===e("select.acf-options-page-parent_slug").val()?(e(".acf-menu-position-desc-child").hide(),e(".acf-menu-position-desc-parent").show()):(e(".acf-menu-position-desc-parent").hide(),e(".acf-menu-position-desc-child").show())}}),new acf.Model({id:"optionsPageModalManager",events:{"change .location-rule-value":"createOptionsPage"},createOptionsPage:function(a){const n=e(a.target);if("add_new_options_page"!==n.val())return;let o=!1;const s=function(a){o=acf.newPopup({title:a.data.title,content:a.data.content,width:"600px"}),o.$el.addClass("acf-create-options-page-popup");const n=o.$el.find("#acf_ui_options_page-page_title"),s=n.val();n.focus().val("").val(s),acf.newSelect2(e("#acf_ui_options_page-parent_slug"),{field:!1,templateSelection:t,templateResult:t,dropdownCssClass:"field-type-select-results"}),o.on("submit","form",c)},c=function(t){t.preventDefault(),acf.validateForm({form:e("#acf-create-options-page-form"),success:i,failure:l})},i=function(){const t=e("#acf-create-options-page-form").serializeArray(),a={action:"acf/create_options_page"};t.forEach((e=>{a[e.name]=e.value})),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:p})},l=function(t){const a=e("#acf-create-options-page-form"),n=a.find(".acf-field .acf-error-message");a.find(".acf-notice").first().remove(),n.each((function(){const t=e(this).closest(".acf-field").find(".acf-label:first");e(this).attr("class","acf-options-page-modal-error").appendTo(t)}))},p=function(e){e.success&&e.data.menu_slug?(n.prepend('<option value="'+e.data.menu_slug+'">'+e.data.page_title+"</option>"),n.val(e.data.menu_slug),o.close()):!e.success&&e.data.error&&alert(e.data.error)};!function(){const t=e(".acf-headerbar-title-field").val(),a={action:"acf/create_options_page",acf_parent_page_choices:this.acf.data.optionPageParentOptions?this.acf.data.optionPageParentOptions:[]};t.length&&(a.field_group_title=t),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:s})}()}})}(jQuery)}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";a(805)})()})();
(()=>{var e={805:()=>{!function(e){const t=function(t){return void 0===t.element?t:t.children&&"None"===t.text?void 0:("acfOptionsPages"===t.text&&(t.text=acf.__("Options Pages")),e('<span class="acf-selection"></span>').data("element",t.element).html(acf.strEscape(t.text)))},a=function(t){if(void 0===t.element)return t;const a=e('<span class="acf-selection"></span>');return a.html(acf.strEscape(t.element.innerHTML)),"options"!==t.id&&"edit_posts"!==t.id||a.append('<span class="acf-select2-default-pill">'+acf.__("Default")+"</span>"),a.data("element",t.element),a};new acf.Model({id:"UIOptionsPageManager",wait:"ready",events:{"change .acf-options-page-parent_slug":"toggleMenuPositionDesc"},initialize:function(){"ui_options_page"===acf.get("screen")&&(acf.newSelect2(e("select.acf-options-page-parent_slug"),{field:!1,templateSelection:t,templateResult:t,dropdownCssClass:"field-type-select-results"}),acf.newSelect2(e("select.acf-options-page-capability"),{field:!1,templateSelection:a,templateResult:a}),acf.newSelect2(e("select.acf-options-page-data_storage"),{field:!1,templateSelection:a,templateResult:a}),this.toggleMenuPositionDesc())},toggleMenuPositionDesc:function(t,a){"none"===e("select.acf-options-page-parent_slug").val()?(e(".acf-menu-position-desc-child").hide(),e(".acf-menu-position-desc-parent").show()):(e(".acf-menu-position-desc-parent").hide(),e(".acf-menu-position-desc-child").show())}}),new acf.Model({id:"optionsPageModalManager",events:{"change .location-rule-value":"createOptionsPage"},createOptionsPage:function(a){const n=e(a.target);if("add_new_options_page"!==n.val())return;let o=!1;const s=function(a){o=acf.newPopup({title:a.data.title,content:a.data.content,width:"600px"}),o.$el.addClass("acf-create-options-page-popup");const n=o.$el.find("#acf_ui_options_page-page_title"),s=n.val();n.trigger("focus").val("").val(s),acf.newSelect2(e("#acf_ui_options_page-parent_slug"),{field:!1,templateSelection:t,templateResult:t,dropdownCssClass:"field-type-select-results"}),o.on("submit","form",c)},c=function(t){t.preventDefault(),acf.validateForm({form:e("#acf-create-options-page-form"),success:i,failure:l})},i=function(){const t=e("#acf-create-options-page-form").serializeArray(),a={action:"acf/create_options_page"};t.forEach(e=>{a[e.name]=e.value}),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:p})},l=function(t){const a=e("#acf-create-options-page-form"),n=a.find(".acf-field .acf-error-message");a.find(".acf-notice").first().remove(),n.each(function(){const t=e(this).closest(".acf-field").find(".acf-label:first");e(this).attr("class","acf-options-page-modal-error").appendTo(t)})},p=function(e){e.success&&e.data.menu_slug?(n.prepend('<option value="'+e.data.menu_slug+'">'+e.data.page_title+"</option>"),n.val(e.data.menu_slug),o.close()):!e.success&&e.data.error&&alert(e.data.error)};!function(){const t=e(".acf-headerbar-title-field").val(),a={action:"acf/create_options_page",acf_parent_page_choices:this.acf.data.optionPageParentOptions?this.acf.data.optionPageParentOptions:[]};t.length&&(a.field_group_title=t),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:s})}()}})}(jQuery)}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";a(805)})()})();

View File

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 16.5V21.5H16.5V16.5H21.5V15H16.5V10H15V15H10V16.5H15Z" fill="#1E1E1E"/>
</svg>

After

Width:  |  Height:  |  Size: 188 B

View File

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.625 9.5H19.375C19.444 9.5 19.5 9.556 19.5 9.625V19.375C19.5 19.4082 19.4868 19.4399 19.4634 19.4634C19.4399 19.4868 19.4082 19.5 19.375 19.5H9.625C9.59185 19.5 9.56005 19.4868 9.53661 19.4634C9.51317 19.4399 9.5 19.4082 9.5 19.375V9.625C9.5 9.556 9.556 9.5 9.625 9.5ZM8 9.625C8 8.728 8.728 8 9.625 8H19.375C20.273 8 21 8.728 21 9.625V19.375C21 20.273 20.273 21 19.375 21H9.625C9.19402 21 8.7807 20.8288 8.47595 20.524C8.17121 20.2193 8 19.806 8 19.375V9.625ZM22.5 21.281V12.281H24V21.281C24 22.8 22.77 24 21.251 24H10.25V22.5H21.251C21.941 22.5 22.5 21.972 22.5 21.281Z" fill="#1E1E1E"/>
</svg>

After

Width:  |  Height:  |  Size: 743 B

View File

@ -0,0 +1,3 @@
<svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 3L11 0L2.5 8.5L1.5 12.5L5.5 11.5L14 3ZM7 14.5H0V16H7V14.5Z" fill="#1E1E1E"/>
</svg>

After

Width:  |  Height:  |  Size: 193 B

View File

@ -0,0 +1,4 @@
<svg width="18" height="17" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.999607 10C1.67043 10.3354 1.6703 10.3357 1.67017 10.3359L1.67298 10.3305C1.67621 10.3242 1.68184 10.3135 1.68988 10.2985C1.70595 10.2686 1.7316 10.2218 1.76695 10.1608C1.8377 10.0385 1.94692 9.8592 2.09541 9.6419C2.39312 9.2062 2.84436 8.624 3.45435 8.0431C4.67308 6.88241 6.49719 5.75 8.9996 5.75C11.502 5.75 13.3261 6.88241 14.5449 8.0431C15.1549 8.624 15.6061 9.2062 15.9038 9.6419C16.0523 9.8592 16.1615 10.0385 16.2323 10.1608C16.2676 10.2218 16.2933 10.2686 16.3093 10.2985C16.3174 10.3135 16.323 10.3242 16.3262 10.3305L16.3291 10.3359C16.3289 10.3357 16.3288 10.3354 16.9996 10C17.6704 9.6646 17.6703 9.6643 17.6701 9.664L17.6688 9.6614L17.6662 9.6563L17.6583 9.6408C17.6517 9.6282 17.6427 9.6108 17.631 9.5892C17.6078 9.5459 17.5744 9.4852 17.5306 9.4096C17.4432 9.2584 17.3141 9.0471 17.1423 8.7956C16.7994 8.2938 16.2819 7.626 15.5794 6.9569C14.1731 5.61759 11.9972 4.25 8.9996 4.25C6.00203 4.25 3.82614 5.61759 2.41987 6.9569C1.71736 7.626 1.19984 8.2938 0.856937 8.7956C0.685107 9.0471 0.556047 9.2584 0.468597 9.4096C0.424837 9.4852 0.391417 9.5459 0.368177 9.5892C0.356557 9.6108 0.347477 9.6282 0.340917 9.6408L0.332967 9.6563L0.330407 9.6614L0.329477 9.6632C0.329307 9.6635 0.328787 9.6646 0.999607 10ZM8.9996 13C10.9326 13 12.4996 11.433 12.4996 9.5C12.4996 7.567 10.9326 6 8.9996 6C7.0666 6 5.49961 7.567 5.49961 9.5C5.49961 11.433 7.0666 13 8.9996 13Z" fill="#1E1E1E"/>
<rect x="12.317" y="1.31699" width="2" height="16" transform="rotate(30 12.317 1.31699)" fill="#1E1E1E" stroke="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17 23H15V21H17V23ZM17 17H15V15H17V17ZM17 11H15V9H17V11Z" fill="#1E1E1E"/>
</svg>

After

Width:  |  Height:  |  Size: 187 B

View File

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(4,3)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.5C11.5346 5.49986 11.0806 5.64404 10.7006 5.91269C10.3205 6.18133 10.0331 6.56121 9.878 7H14.122C13.9667 6.56129 13.6793 6.18149 13.2993 5.91287C12.9193 5.64425 12.4654 5.50001 12 5.5ZM12 4C11.1356 4.00001 10.2977 4.29859 9.62801 4.84525C8.95836 5.3919 8.49807 6.15306 8.325 7H5V8.5H6.27L7.088 17.497C7.15014 18.1805 7.46559 18.816 7.97239 19.2788C8.47919 19.7415 9.14071 19.9981 9.827 19.998H14.174C14.86 19.9978 15.5211 19.7413 16.0277 19.2788C16.5342 18.8163 16.8496 18.1811 16.912 17.498L17.73 8.5H19V7H15.675C15.5019 6.15306 15.0416 5.3919 14.372 4.84525C13.7023 4.29859 12.8644 4.00001 12 4ZM16.224 8.5H7.776L8.582 17.361C8.6102 17.6717 8.75357 17.9606 8.98394 18.171C9.21431 18.3814 9.51502 18.498 9.827 18.498H14.174C14.486 18.498 14.7867 18.3814 15.0171 18.171C15.2474 17.9606 15.3908 17.6717 15.419 17.361L16.224 8.5Z" fill="#B80F38"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,3 @@
<svg width="18" height="9" viewBox="0 0 18 9" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.999607 6C1.67043 6.3354 1.6703 6.3357 1.67017 6.3359L1.67298 6.3305C1.67621 6.3242 1.68184 6.3135 1.68988 6.2985C1.70595 6.2686 1.7316 6.2218 1.76695 6.1608C1.8377 6.0385 1.94692 5.8592 2.09541 5.6419C2.39312 5.2062 2.84436 4.624 3.45435 4.0431C4.67308 2.88241 6.49719 1.75 8.9996 1.75C11.502 1.75 13.3261 2.88241 14.5449 4.0431C15.1549 4.624 15.6061 5.2062 15.9038 5.6419C16.0523 5.8592 16.1615 6.0385 16.2323 6.1608C16.2676 6.2218 16.2933 6.2686 16.3093 6.2985C16.3174 6.3135 16.323 6.3242 16.3262 6.3305L16.3291 6.3359C16.3289 6.3357 16.3288 6.3354 16.9996 6C17.6704 5.6646 17.6703 5.6643 17.6701 5.664L17.6688 5.6614L17.6662 5.6563L17.6583 5.6408C17.6517 5.6282 17.6427 5.6108 17.631 5.5892C17.6078 5.5459 17.5744 5.4852 17.5306 5.4096C17.4432 5.2584 17.3141 5.0471 17.1423 4.7956C16.7994 4.2938 16.2819 3.626 15.5794 2.9569C14.1731 1.61759 11.9972 0.25 8.9996 0.25C6.00203 0.25 3.82614 1.61759 2.41987 2.9569C1.71736 3.626 1.19984 4.2938 0.856937 4.7956C0.685107 5.0471 0.556047 5.2584 0.468597 5.4096C0.424837 5.4852 0.391417 5.5459 0.368177 5.5892C0.356557 5.6108 0.347477 5.6282 0.340917 5.6408L0.332967 5.6563L0.330407 5.6614L0.329477 5.6632C0.329307 5.6635 0.328787 5.6646 0.999607 6ZM8.9996 9C10.9326 9 12.4996 7.433 12.4996 5.5C12.4996 3.567 10.9326 2 8.9996 2C7.0666 2 5.49961 3.567 5.49961 5.5C5.49961 7.433 7.0666 9 8.9996 9Z" fill="#1E1E1E"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,6 +1,6 @@
<svg width="1064" height="208" viewBox="0 0 1064 208" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1058.44 56.71L1054.62 65.8L1050.83 56.71H1048.14V69.17H1050.35V60.78L1054.04 69.17H1055.25L1058.9 60.81V69.17H1061.16V56.71H1058.44Z" fill="#002447"/>
<path d="M1036.16 58.66H1039.93V69.17H1042.18V58.66H1045.95V56.71H1036.16V58.66Z" fill="#002447"/>
<path d="M1060.27 64.01C1059.68 62.62 1058.85 61.4 1057.8 60.34C1056.74 59.29 1055.52 58.46 1054.13 57.87C1052.74 57.28 1051.25 56.98 1049.65 56.98C1048.05 56.98 1046.57 57.28 1045.17 57.87C1043.78 58.46 1042.56 59.29 1041.5 60.34C1040.44 61.4 1039.62 62.62 1039.02 64.01C1038.43 65.4 1038.13 66.89 1038.13 68.49C1038.13 70.09 1038.43 71.57 1039.02 72.97C1039.61 74.36 1040.44 75.58 1041.5 76.64C1042.55 77.7 1043.78 78.52 1045.17 79.11C1046.56 79.7 1048.05 80 1049.65 80C1051.25 80 1052.73 79.7 1054.13 79.11C1055.52 78.52 1056.74 77.69 1057.8 76.64C1058.86 75.58 1059.68 74.36 1060.27 72.97C1060.86 71.58 1061.16 70.09 1061.16 68.49C1061.16 66.89 1060.86 65.41 1060.27 64.01ZM1057.75 73.19C1056.91 74.61 1055.78 75.73 1054.36 76.58C1052.94 77.42 1051.37 77.85 1049.65 77.85C1047.93 77.85 1046.35 77.43 1044.94 76.58C1043.53 75.74 1042.4 74.61 1041.55 73.19C1040.71 71.77 1040.28 70.2 1040.28 68.48C1040.28 66.76 1040.7 65.18 1041.55 63.77C1042.39 62.36 1043.52 61.23 1044.94 60.38C1046.36 59.54 1047.93 59.11 1049.65 59.11C1051.37 59.11 1052.95 59.53 1054.36 60.38C1055.78 61.22 1056.9 62.35 1057.75 63.77C1058.59 65.19 1059.02 66.76 1059.02 68.48C1059.02 70.2 1058.6 71.78 1057.75 73.19Z" fill="#002447"/>
<path d="M1052.32 69.44C1052.32 69.44 1052.34 69.44 1052.35 69.43C1052.87 69.15 1053.3 68.75 1053.64 68.23C1053.98 67.71 1054.15 67.09 1054.15 66.37C1054.15 65.65 1053.98 65.04 1053.65 64.55C1053.32 64.06 1052.9 63.68 1052.4 63.43C1051.9 63.18 1051.38 63.05 1050.84 63.05H1046C1045.86 63.05 1045.75 63.16 1045.75 63.3V73.42C1045.75 73.56 1045.86 73.67 1046 73.67H1047.36C1047.5 73.67 1047.61 73.56 1047.61 73.42V69.86H1050.53L1052.45 73.54C1052.49 73.62 1052.58 73.67 1052.67 73.67H1054.19C1054.37 73.67 1054.49 73.48 1054.4 73.32L1052.33 69.45L1052.32 69.44ZM1051.55 67.87C1051.16 68.22 1050.72 68.4 1050.23 68.4H1047.6V64.5H1050.28C1050.74 64.5 1051.16 64.64 1051.55 64.93C1051.94 65.22 1052.13 65.7 1052.13 66.37C1052.13 67.04 1051.94 67.52 1051.55 67.87Z" fill="#002447"/>
<path d="M387.93 56.01H364.88C364.41 56.01 364 56.33 363.9 56.79C362.34 64.07 350.48 119.72 349.82 124.39C349.77 124.74 349.55 124.74 349.5 124.39C348.76 119.72 335.93 63.99 334.27 56.77C334.17 56.32 333.76 56 333.3 56H311.79C311.32 56 310.92 56.31 310.82 56.77C309.15 63.98 296.28 119.72 295.56 124.39C295.49 124.82 295.24 124.82 295.17 124.39C294.49 119.72 282.67 64.08 281.12 56.79C281.02 56.33 280.62 56 280.14 56H257.09C256.43 56 255.95 56.62 256.12 57.26L281.19 151.13C281.31 151.57 281.7 151.87 282.16 151.87H306.4C306.86 151.87 307.26 151.56 307.37 151.11C308.89 144.7 319.55 99.78 321.96 89.27C322.08 88.75 322.81 88.75 322.93 89.27C325.37 99.77 336.16 144.71 337.69 151.11C337.8 151.56 338.2 151.87 338.66 151.87H362.84C363.29 151.87 363.69 151.57 363.81 151.13L388.88 57.26C389.05 56.63 388.57 56 387.91 56L387.93 56.01Z" fill="#002447"/>
<path d="M462.52 60.19C457.29 57.4 451.07 56.01 443.86 56.01H406.59C406.04 56.01 405.59 56.46 405.59 57.01V150.88C405.59 151.43 406.04 151.88 406.59 151.88H427.3C427.85 151.88 428.3 151.43 428.3 150.88V121.96H443.21C450.54 121.96 456.87 120.59 462.19 117.84C467.51 115.1 471.61 111.28 474.48 106.39C477.35 101.5 478.79 95.75 478.79 89.15C478.79 82.55 477.38 76.82 474.57 71.84C471.76 66.86 467.74 62.98 462.51 60.19H462.52ZM455.41 96.93C454.21 99.16 452.41 100.9 450 102.14C447.6 103.38 444.62 104.01 441.06 104.01H428.31V74.41H441C444.56 74.41 447.55 75.01 449.97 76.21C452.39 77.41 454.2 79.12 455.41 81.33C456.61 83.54 457.21 86.15 457.21 89.15C457.21 92.15 456.61 94.71 455.41 96.94V96.93Z" fill="#002447"/>
<path d="M583.93 67.87C580.2 64.11 576 61.31 571.33 59.47C566.66 57.63 561.8 56.71 556.75 56.71C548.73 56.71 541.69 58.77 535.63 62.89C529.56 67.01 524.84 72.66 521.47 79.85C518.09 87.04 516.41 95.28 516.41 104.55C516.41 113.82 518.13 122.04 521.56 129.17C524.99 136.31 529.85 141.89 536.14 145.93C542.43 149.96 549.88 151.98 558.5 151.98C564.7 151.98 570.19 150.98 574.97 148.97C579.75 146.97 583.71 144.32 586.87 141.02C589.75 138.01 591.91 134.78 593.35 131.32C593.57 130.78 593.27 130.17 592.72 129.99L583.98 127.21C583.49 127.06 582.98 127.3 582.77 127.76C581.68 130.14 580.14 132.35 578.14 134.39C575.92 136.67 573.17 138.5 569.91 139.87C566.64 141.24 562.87 141.93 558.59 141.93C552.28 141.93 546.8 140.44 542.16 137.44C537.52 134.45 533.94 130.25 531.41 124.84C529.05 119.79 527.81 113.95 527.65 107.34H594.97C595.52 107.34 595.97 106.89 595.97 106.34V102.48C595.97 94.69 594.9 87.91 592.76 82.14C590.62 76.38 587.68 71.61 583.95 67.85L583.93 67.87ZM531.28 83.55C533.72 78.5 537.13 74.44 541.49 71.36C545.85 68.29 550.95 66.75 556.77 66.75C562.59 66.75 567.67 68.26 571.84 71.28C576.01 74.3 579.22 78.42 581.47 83.63C583.3 87.87 584.38 92.57 584.72 97.71H527.69C527.98 92.62 529.17 87.9 531.28 83.55Z" fill="#002447"/>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,12 +1,12 @@
<svg width="1064" height="208" viewBox="0 0 1064 208" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1058.44 56.71L1054.62 65.8L1050.83 56.71H1048.14V69.17H1050.35V60.78L1054.04 69.17H1055.25L1058.9 60.81V69.17H1061.16V56.71H1058.44Z" fill="white"/>
<path d="M1036.16 58.66H1039.93V69.17H1042.18V58.66H1045.95V56.71H1036.16V58.66Z" fill="white"/>
<path d="M1060.27 64.01C1059.68 62.62 1058.85 61.4 1057.8 60.34C1056.74 59.29 1055.52 58.46 1054.13 57.87C1052.74 57.28 1051.25 56.98 1049.65 56.98C1048.05 56.98 1046.57 57.28 1045.17 57.87C1043.78 58.46 1042.56 59.29 1041.5 60.34C1040.44 61.4 1039.62 62.62 1039.02 64.01C1038.43 65.4 1038.13 66.89 1038.13 68.49C1038.13 70.09 1038.43 71.57 1039.02 72.97C1039.61 74.36 1040.44 75.58 1041.5 76.64C1042.55 77.7 1043.78 78.52 1045.17 79.11C1046.56 79.7 1048.05 80 1049.65 80C1051.25 80 1052.73 79.7 1054.13 79.11C1055.52 78.52 1056.74 77.69 1057.8 76.64C1058.86 75.58 1059.68 74.36 1060.27 72.97C1060.86 71.58 1061.16 70.09 1061.16 68.49C1061.16 66.89 1060.86 65.41 1060.27 64.01ZM1057.75 73.19C1056.91 74.61 1055.78 75.73 1054.36 76.58C1052.94 77.42 1051.37 77.85 1049.65 77.85C1047.93 77.85 1046.35 77.43 1044.94 76.58C1043.53 75.74 1042.4 74.61 1041.55 73.19C1040.71 71.77 1040.28 70.2 1040.28 68.48C1040.28 66.76 1040.7 65.18 1041.55 63.77C1042.39 62.36 1043.52 61.23 1044.94 60.38C1046.36 59.54 1047.93 59.11 1049.65 59.11C1051.37 59.11 1052.95 59.53 1054.36 60.38C1055.78 61.22 1056.9 62.35 1057.75 63.77C1058.59 65.19 1059.02 66.76 1059.02 68.48C1059.02 70.2 1058.6 71.78 1057.75 73.19Z" fill="white"/>
<path d="M1052.32 69.44C1052.32 69.44 1052.34 69.44 1052.35 69.43C1052.87 69.15 1053.3 68.75 1053.64 68.23C1053.98 67.71 1054.15 67.09 1054.15 66.37C1054.15 65.65 1053.98 65.04 1053.65 64.55C1053.32 64.06 1052.9 63.68 1052.4 63.43C1051.9 63.18 1051.38 63.05 1050.84 63.05H1046C1045.86 63.05 1045.75 63.16 1045.75 63.3V73.42C1045.75 73.56 1045.86 73.67 1046 73.67H1047.36C1047.5 73.67 1047.61 73.56 1047.61 73.42V69.86H1050.53L1052.45 73.54C1052.49 73.62 1052.58 73.67 1052.67 73.67H1054.19C1054.37 73.67 1054.49 73.48 1054.4 73.32L1052.33 69.45L1052.32 69.44ZM1051.55 67.87C1051.16 68.22 1050.72 68.4 1050.23 68.4H1047.6V64.5H1050.28C1050.74 64.5 1051.16 64.64 1051.55 64.93C1051.94 65.22 1052.13 65.7 1052.13 66.37C1052.13 67.04 1051.94 67.52 1051.55 67.87Z" fill="white"/>
<path d="M387.93 56.01H364.88C364.41 56.01 364 56.33 363.9 56.79C362.34 64.07 350.48 119.72 349.82 124.39C349.77 124.74 349.55 124.74 349.5 124.39C348.76 119.72 335.93 63.99 334.27 56.77C334.17 56.32 333.76 56 333.3 56H311.79C311.32 56 310.92 56.31 310.82 56.77C309.15 63.98 296.28 119.72 295.56 124.39C295.49 124.82 295.24 124.82 295.17 124.39C294.49 119.72 282.67 64.08 281.12 56.79C281.02 56.33 280.62 56 280.14 56H257.09C256.43 56 255.95 56.62 256.12 57.26L281.19 151.13C281.31 151.57 281.7 151.87 282.16 151.87H306.4C306.86 151.87 307.26 151.56 307.37 151.11C308.89 144.7 319.55 99.78 321.96 89.27C322.08 88.75 322.81 88.75 322.93 89.27C325.37 99.77 336.16 144.71 337.69 151.11C337.8 151.56 338.2 151.87 338.66 151.87H362.84C363.29 151.87 363.69 151.57 363.81 151.13L388.88 57.26C389.05 56.63 388.57 56 387.91 56L387.93 56.01Z" fill="white"/>
<path d="M462.52 60.19C457.29 57.4 451.07 56.01 443.86 56.01H406.59C406.04 56.01 405.59 56.46 405.59 57.01V150.88C405.59 151.43 406.04 151.88 406.59 151.88H427.3C427.85 151.88 428.3 151.43 428.3 150.88V121.96H443.21C450.54 121.96 456.87 120.59 462.19 117.84C467.51 115.1 471.61 111.28 474.48 106.39C477.35 101.5 478.79 95.75 478.79 89.15C478.79 82.55 477.38 76.82 474.57 71.84C471.76 66.86 467.74 62.98 462.51 60.19H462.52ZM455.41 96.93C454.21 99.16 452.41 100.9 450 102.14C447.6 103.38 444.62 104.01 441.06 104.01H428.31V74.41H441C444.56 74.41 447.55 75.01 449.97 76.21C452.39 77.41 454.2 79.12 455.41 81.33C456.61 83.54 457.21 86.15 457.21 89.15C457.21 92.15 456.61 94.71 455.41 96.94V96.93Z" fill="white"/>
<path d="M583.93 67.87C580.2 64.11 576 61.31 571.33 59.47C566.66 57.63 561.8 56.71 556.75 56.71C548.73 56.71 541.69 58.77 535.63 62.89C529.56 67.01 524.84 72.66 521.47 79.85C518.09 87.04 516.41 95.28 516.41 104.55C516.41 113.82 518.13 122.04 521.56 129.17C524.99 136.31 529.85 141.89 536.14 145.93C542.43 149.96 549.88 151.98 558.5 151.98C564.7 151.98 570.19 150.98 574.97 148.97C579.75 146.97 583.71 144.32 586.87 141.02C589.75 138.01 591.91 134.78 593.35 131.32C593.57 130.78 593.27 130.17 592.72 129.99L583.98 127.21C583.49 127.06 582.98 127.3 582.77 127.76C581.68 130.14 580.14 132.35 578.14 134.39C575.92 136.67 573.17 138.5 569.91 139.87C566.64 141.24 562.87 141.93 558.59 141.93C552.28 141.93 546.8 140.44 542.16 137.44C537.52 134.45 533.94 130.25 531.41 124.84C529.05 119.79 527.81 113.95 527.65 107.34H594.97C595.52 107.34 595.97 106.89 595.97 106.34V102.48C595.97 94.69 594.9 87.91 592.76 82.14C590.62 76.38 587.68 71.61 583.95 67.85L583.93 67.87ZM531.28 83.55C533.72 78.5 537.13 74.44 541.49 71.36C545.85 68.29 550.95 66.75 556.77 66.75C562.59 66.75 567.67 68.26 571.84 71.28C576.01 74.3 579.22 78.42 581.47 83.63C583.3 87.87 584.38 92.57 584.72 97.71H527.69C527.98 92.62 529.17 87.9 531.28 83.55Z" fill="white"/>
<path d="M672.03 60.62C667.34 58.01 661.86 56.71 655.6 56.71C648.63 56.71 642.44 58.49 637.03 62.06C632.71 64.91 629.32 69.2 626.84 74.89L626.78 58.94C626.78 58.39 626.33 57.94 625.78 57.94H616.99C616.44 57.94 615.99 58.39 615.99 58.94V149C615.99 149.55 616.44 150 616.99 150H626.19C626.74 150 627.19 149.55 627.19 149V92.61C627.19 87.34 628.3 82.77 630.52 78.9C632.74 75.03 635.78 72.07 639.62 70.01C643.46 67.95 647.8 66.92 652.63 66.92C659.71 66.92 665.36 69.1 669.59 73.47C673.82 77.83 675.93 83.78 675.93 91.3V149.01C675.93 149.56 676.38 150.01 676.93 150.01H686.05C686.6 150.01 687.05 149.56 687.05 149.01V90.48C687.05 83.18 685.72 77.03 683.06 72.03C680.4 67.04 676.72 63.23 672.03 60.63V60.62Z" fill="white"/>
<path d="M783.6 57.94H774.73C774.18 57.94 773.73 58.39 773.73 58.94V75.64H772.58C771.37 72.84 769.63 69.97 767.35 67.04C765.07 64.1 762.07 61.65 758.33 59.67C754.6 57.69 749.93 56.71 744.33 56.71C736.81 56.71 730.19 58.69 724.48 62.64C718.77 66.59 714.32 72.1 711.14 79.15C707.96 86.2 706.36 94.43 706.36 103.81C706.36 113.19 707.98 121.27 711.22 128.02C714.46 134.77 718.92 139.96 724.6 143.58C730.28 147.2 736.77 149.01 744.07 149.01C749.56 149.01 754.17 148.12 757.9 146.33C761.63 144.55 764.67 142.27 767 139.5C769.33 136.73 771.1 133.91 772.31 131.06H773.38V151.73C773.38 160.18 770.91 166.43 765.97 170.46C761.03 174.5 754.5 176.51 746.37 176.51C741.26 176.51 736.95 175.81 733.44 174.41C729.93 173.01 727.06 171.2 724.83 168.98C722.88 167.03 721.28 165.03 720.03 162.97C719.74 162.5 719.13 162.34 718.66 162.62L711.11 167.2C710.66 167.48 710.49 168.06 710.74 168.53C712.51 171.81 714.89 174.74 717.88 177.33C721.12 180.13 725.11 182.34 729.86 183.96C734.61 185.58 740.11 186.39 746.37 186.39C753.73 186.39 760.29 185.17 766.05 182.73C771.81 180.29 776.34 176.54 779.64 171.49C782.93 166.44 784.58 160.02 784.58 152.22V58.94C784.58 58.39 784.13 57.94 783.58 57.94H783.6ZM770.28 122.54C768.08 127.84 764.91 131.9 760.77 134.73C756.62 137.56 751.62 138.97 745.74 138.97C739.86 138.97 734.68 137.48 730.51 134.48C726.34 131.49 723.15 127.33 720.96 122.01C718.76 116.69 717.67 110.54 717.67 103.56C717.67 96.58 718.75 90.5 720.92 84.95C723.09 79.41 726.26 75 730.43 71.73C734.6 68.46 739.71 66.83 745.75 66.83C751.79 66.83 756.78 68.41 760.9 71.56C765.02 74.72 768.16 79.05 770.33 84.57C772.5 90.09 773.58 96.41 773.58 103.55C773.58 110.69 772.48 117.23 770.29 122.53L770.28 122.54Z" fill="white"/>
<path d="M823.62 57.94H814.42C813.868 57.94 813.42 58.3877 813.42 58.94V149C813.42 149.552 813.868 150 814.42 150H823.62C824.173 150 824.62 149.552 824.62 149V58.94C824.62 58.3877 824.173 57.94 823.62 57.94Z" fill="white"/>
<path d="M823.62 57.94H814.42C813.868 57.94 813.42 58.3877 813.42 58.94V149C813.42 149.552 813.868 150 814.42 150H823.62C824.172 150 824.62 149.552 824.62 149V58.94C824.62 58.3877 824.172 57.94 823.62 57.94Z" fill="white"/>
<path d="M819.02 44.89C822.516 44.89 825.35 42.0559 825.35 38.56C825.35 35.064 822.516 32.23 819.02 32.23C815.524 32.23 812.69 35.064 812.69 38.56C812.69 42.0559 815.524 44.89 819.02 44.89Z" fill="white"/>
<path d="M910.3 60.62C905.61 58.01 900.13 56.71 893.87 56.71C886.9 56.71 880.71 58.49 875.3 62.06C870.98 64.91 867.59 69.2 865.11 74.89L865.05 58.94C865.05 58.39 864.6 57.94 864.05 57.94H855.26C854.71 57.94 854.26 58.39 854.26 58.94V149C854.26 149.55 854.71 150 855.26 150H864.46C865.01 150 865.46 149.55 865.46 149V92.61C865.46 87.34 866.57 82.77 868.79 78.9C871.01 75.03 874.05 72.07 877.89 70.01C881.73 67.95 886.07 66.92 890.9 66.92C897.98 66.92 903.63 69.1 907.86 73.47C912.09 77.83 914.2 83.78 914.2 91.3V149.01C914.2 149.56 914.65 150.01 915.2 150.01H924.32C924.87 150.01 925.32 149.56 925.32 149.01V90.48C925.32 83.18 923.99 77.03 921.33 72.03C918.67 67.04 914.99 63.23 910.3 60.63V60.62Z" fill="white"/>
<path d="M1012.78 67.87C1009.05 64.11 1004.85 61.31 1000.18 59.47C995.51 57.63 990.65 56.71 985.6 56.71C977.58 56.71 970.54 58.77 964.48 62.89C958.41 67.01 953.69 72.66 950.32 79.85C946.94 87.04 945.26 95.28 945.26 104.55C945.26 113.82 946.98 122.04 950.41 129.17C953.84 136.31 958.7 141.89 964.99 145.93C971.28 149.96 978.73 151.98 987.35 151.98C993.55 151.98 999.04 150.98 1003.82 148.97C1008.6 146.97 1012.56 144.32 1015.72 141.02C1018.6 138.01 1020.76 134.78 1022.2 131.32C1022.42 130.78 1022.12 130.17 1021.57 129.99L1012.83 127.21C1012.34 127.06 1011.83 127.3 1011.62 127.76C1010.53 130.14 1008.99 132.35 1006.99 134.39C1004.77 136.67 1002.02 138.5 998.76 139.87C995.49 141.24 991.72 141.93 987.44 141.93C981.13 141.93 975.65 140.44 971.01 137.44C966.37 134.45 962.79 130.25 960.26 124.84C957.9 119.79 956.66 113.95 956.5 107.34H1023.82C1024.37 107.34 1024.82 106.89 1024.82 106.34V102.48C1024.82 94.69 1023.75 87.91 1021.61 82.14C1019.47 76.38 1016.53 71.61 1012.8 67.85L1012.78 67.87ZM960.12 83.55C962.56 78.5 965.97 74.44 970.33 71.36C974.69 68.29 979.79 66.75 985.61 66.75C991.43 66.75 996.51 68.26 1000.68 71.28C1004.85 74.3 1008.06 78.42 1010.31 83.63C1012.14 87.87 1013.22 92.57 1013.56 97.71H956.53C956.82 92.62 958.01 87.9 960.12 83.55Z" fill="white"/>

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,8 +1,12 @@
<?php
/**
* The ACF Update Class, responsible for talking to the connect API server and injecting PRO's update data into WordPress.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
namespace ACF;
@ -54,13 +58,46 @@ if ( ! class_exists( 'Updater' ) ) {
return;
}
// append update information to transient.
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'modify_plugins_transient' ), 10, 1 );
// append update information to transient on both save and get.
add_filter( 'site_transient_update_plugins', array( $this, 'modify_plugins_transient' ), 10, 1 );
// clear ACF transient when updates complete.
add_filter( 'upgrader_process_complete', array( $this, 'clear_transients_on_upgrade' ), 5, 2 );
// modify plugin data visible in the 'View details' popup.
add_filter( 'plugins_api', array( $this, 'modify_plugin_details' ), 10, 3 );
}
/**
* Clears ACF plugin update transients when ACF is updated.
*
* This method is hooked to the 'upgrader_process_complete' action and will
* delete the 'acf_plugin_updates' transient when the ACF plugin is updated,
* ensuring fresh update data is fetched on the next check.
*
* @since 6.5.1
*
* @param WP_Upgrader $upgrader_object The upgrader instance.
* @param array $options Array of update details including:
* - 'action' (string) The action performed (e.g., 'update').
* - 'type' (string) The type of update (e.g., 'plugin').
* - 'plugins' (array) Array of plugin basenames that were updated.
*/
public function clear_transients_on_upgrade( $upgrader_object, $options ) {
// Check if this was a plugin update
if ( $options['action'] === 'update' && $options['type'] === 'plugin' ) {
// Check if we were one of the updated plugins
if ( isset( $options['plugins'] ) ) {
$acf_basename = acf_get_setting( 'basename' );
if ( in_array( $acf_basename, $options['plugins'], true ) ) {
$plugin = $this->get_plugin_by( 'basename', $acf_basename );
$plugin_id = $plugin ? $plugin['id'] : false;
$this->refresh_plugins_transient( $plugin_id );
}
}
}
}
/**
* Registeres a plugin for updates.
*
@ -134,6 +171,16 @@ if ( ! class_exists( 'Updater' ) ) {
'X-ACF-URL' => $site_url,
);
// Add update channel header if defined.
if ( defined( 'ACF_UPDATE_CHANNEL' ) && ACF_UPDATE_CHANNEL ) {
$headers['X-ACF-Update-Channel'] = ACF_UPDATE_CHANNEL;
}
// Add plugin override header if defined.
if ( defined( 'ACF_RELEASE_ACCESS_KEY' ) && ACF_RELEASE_ACCESS_KEY ) {
$headers['X-ACF-Release-Access-Key'] = ACF_RELEASE_ACCESS_KEY;
}
$url = "https://connect.advancedcustomfields.com/$endpoint";
// Staging environment.
@ -142,14 +189,21 @@ if ( ! class_exists( 'Updater' ) ) {
acf_log( $url, $body );
}
// If we're posting an ACF license key, set it as the header.
if ( is_array( $body ) && isset( $body['acf_license'] ) ) {
$headers['X-ACF-License'] = $body['acf_license'];
}
// Determine URL.
if ( acf_is_pro() ) {
$license_key = acf_pro_get_license_key();
if ( empty( $license_key ) || ! is_string( $license_key ) ) {
$license_key = '';
if ( empty( $headers['X-ACF-License'] ) ) {
$license_key = acf_pro_get_license_key();
if ( empty( $license_key ) || ! is_string( $license_key ) ) {
$license_key = '';
}
$headers['X-ACF-License'] = $license_key;
}
$headers['X-ACF-License'] = $license_key;
$headers['X-ACF-Plugin'] = 'pro';
$headers['X-ACF-Plugin'] = 'pro';
} else {
$headers['X-ACF-Plugin'] = 'acf';
}
@ -384,13 +438,19 @@ if ( ! class_exists( 'Updater' ) ) {
}
/**
* Deletes transients and allows a fresh lookup.
* Deletes cached ACF plugin update transients and allows a fresh lookup.
*
* @since 5.5.10
*
* @param string|false $id Optional. The plugin ID to clear specific plugin info transient.
* If provided, will delete the 'acf_plugin_info_{id}' transient.
* Defaults to false.
*/
public function refresh_plugins_transient() {
delete_site_transient( 'update_plugins' );
public function refresh_plugins_transient( $id = false ) {
delete_transient( 'acf_plugin_updates' );
if ( ! empty( $id ) && is_string( $id ) ) {
delete_transient( 'acf_plugin_info_' . $id );
}
}
/**
@ -402,7 +462,6 @@ if ( ! class_exists( 'Updater' ) ) {
* @return object $transient The modified transient value.
*/
public function modify_plugins_transient( $transient ) {
// Bail early if no response (error).
if ( ! isset( $transient->response ) ) {
return $transient;

View File

@ -1,8 +1,12 @@
<?php
/**
* Initializes ACF updater logic and logic specific to ACF direct downloads.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {

View File

@ -1,8 +1,12 @@
<?php
/**
* General functions relating to the bidirectional feature of some fields.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Register store.
acf_register_store( 'fields' )->prop( 'multisite', true );
@ -828,7 +837,12 @@ function acf_render_field_label( $field ) {
// Output label.
if ( $label ) {
echo '<label' . ( $field['id'] ? ' for="' . esc_attr( $field['id'] ) . '"' : '' ) . '>' . acf_esc_html( $label ) . '</label>';
// For multi-choice fields (radio, checkbox, taxonomy, button_group), don't use 'for' attribute but add ID for aria-labelledby
if ( in_array( $field['type'], array( 'radio', 'checkbox', 'taxonomy', 'button_group' ), true ) && $field['id'] ) {
echo '<label id="' . esc_attr( $field['id'] ) . '-label">' . acf_esc_html( $label ) . '</label>';
} else {
echo '<label' . ( $field['id'] ? ' for="' . esc_attr( $field['id'] ) . '"' : '' ) . '>' . acf_esc_html( $label ) . '</label>';
}
}
}
@ -847,7 +861,7 @@ function acf_render_field_label( $field ) {
function acf_get_field_label( $field, $context = '' ) {
// Get label.
$label = $field['label'];
$label = esc_html( $field['label'] );
// Display empty text when editing field.
if ( $context == 'admin' && $label === '' ) {

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* acf_get_field_group
@ -541,3 +550,30 @@ function acf_field_group_has_location_type( int $post_id, string $location ) {
return false;
}
/**
* Retrieves the field group title, or display title if set.
*
* @since 6.6
*
* @param array|integer $field_group The field group array or ID.
* @return string The field group title.
*/
function acf_get_field_group_title( $field_group ): string {
if ( is_numeric( $field_group ) ) {
$field_group = acf_get_field_group( $field_group );
}
$title = '';
if ( ! empty( $field_group['title'] ) && is_string( $field_group['title'] ) ) {
$title = $field_group['title'];
}
// Override with the Display Title if set.
if ( ! empty( $field_group['display_title'] ) && is_string( $field_group['display_title'] ) ) {
$title = $field_group['display_title'];
}
// Filter and return.
return apply_filters( 'acf/get_field_group_title', esc_html( $title ), $field_group );
}

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Register store for form data.
acf_register_store( 'form' );

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* Returns true if the value provided is considered "empty". Allows numbers such as 0.

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Register store.
acf_register_store( 'hook-variations' );

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* acf_filter_attrs
@ -333,7 +342,27 @@ function acf_get_checkbox_input( $attrs = array() ) {
// Render.
$checked = isset( $attrs['checked'] );
return '<label' . ( $checked ? ' class="selected"' : '' ) . '><input ' . acf_esc_attrs( $attrs ) . '/> ' . acf_esc_html( $label ) . '</label>';
// Build label attributes array for accessibility and consistency.
$label_attrs = array();
if ( $checked ) {
$label_attrs['class'] = 'selected';
}
if ( ! empty( $attrs['button_group'] ) ) {
unset( $attrs['button_group'] );
// If tabindex is provided, use it for the label; otherwise, use checked-based default.
if ( isset( $attrs['tabindex'] ) ) {
$label_attrs['tabindex'] = (string) $attrs['tabindex'];
unset( $attrs['tabindex'] );
} else {
$label_attrs['tabindex'] = $checked ? '0' : '-1';
}
$label_attrs['role'] = 'radio';
$label_attrs['aria-checked'] = $checked ? 'true' : 'false';
}
return '<label' . ( acf_esc_attrs( $label_attrs ) ? ' ' . acf_esc_attrs( $label_attrs ) : '' ) . '><input ' . acf_esc_attrs( $attrs ) . '/> ' . acf_esc_html( $label ) . '</label>';
}
/**

View File

@ -1,15 +1,19 @@
<?php
/**
* Generic functions for accessing ACF objects stored as WordPress post types which aren't handled by type specific functions.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* Gets an instance of an ACF_Internal_Post_Type.
*
* @param string $post_type The ACF internal post type to get the instance for.
* @return ACF_Internal_Post_Type|bool The internal post type class instance, or false on failure.
* @return ACF_Internal_Post_Type|boolean The internal post type class instance, or false on failure.
*/
function acf_get_internal_post_type_instance( $post_type = 'acf-field-group' ) {
$store = acf_get_store( 'internal-post-types' );

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* Returns an array of "ACF only" meta for the given post_id.
@ -11,44 +20,21 @@
* @return array
*/
function acf_get_meta( $post_id = 0 ) {
// Allow filter to short-circuit load_value logic.
$null = apply_filters( 'acf/pre_load_meta', null, $post_id );
if ( $null !== null ) {
return ( $null === '__return_null' ) ? null : $null;
}
// Decode $post_id for $type and $id.
$decoded = acf_decode_post_id( $post_id );
// Decode the $post_id for $type and $id.
$decoded = acf_decode_post_id( $post_id );
$instance = acf_get_meta_instance( $decoded['type'] );
$meta = array();
/**
* Determine CRUD function.
*
* - Relies on decoded post_id result to identify option or meta types.
* - Uses xxx_metadata(type) instead of xxx_type_meta() to bypass additional logic that could alter the ID.
*/
if ( $decoded['type'] === 'option' ) {
$allmeta = acf_get_option_meta( $decoded['id'] );
} else {
$allmeta = get_metadata( $decoded['type'], $decoded['id'], '' );
if ( $instance ) {
$meta = $instance->get_meta( $decoded['id'] );
}
// Loop over meta and check that a reference exists for each value.
$meta = array();
if ( $allmeta ) {
foreach ( $allmeta as $key => $value ) {
// If a reference exists for this value, add it to the meta array.
if ( isset( $allmeta[ "_$key" ] ) ) {
$meta[ $key ] = $allmeta[ $key ][0];
$meta[ "_$key" ] = $allmeta[ "_$key" ][0];
}
}
}
// Unserialized results (get_metadata does not unserialize if $key is empty).
$meta = array_map( 'acf_maybe_unserialize', $meta );
/**
* Filters the $meta array after it has been loaded.
*
@ -74,7 +60,6 @@ function acf_get_meta( $post_id = 0 ) {
* @return array
*/
function acf_get_option_meta( $prefix = '' ) {
// Globals.
global $wpdb;
@ -241,32 +226,23 @@ function acf_delete_metadata( $post_id = 0, $name = '', $hidden = false ) {
}
/**
* acf_copy_postmeta
*
* Copies meta from one post to another. Useful for saving and restoring revisions.
*
* @date 25/06/2016
* @since 5.3.8
*
* @param (int|string) $from_post_id The post id to copy from.
* @param (int|string) $to_post_id The post id to paste to.
* @return void
* @param integer|string $from_post_id The post id to copy from.
* @param integer|string $to_post_id The post id to paste to.
* @return void
*/
function acf_copy_metadata( $from_post_id = 0, $to_post_id = 0 ) {
// Get all postmeta.
// Get all metadata.
$meta = acf_get_meta( $from_post_id );
// Check meta.
if ( $meta ) {
$decoded = acf_decode_post_id( $to_post_id );
$instance = acf_get_meta_instance( $decoded['type'] );
// Slash data. WP expects all data to be slashed and will unslash it (fixes '\' character issues).
$meta = wp_slash( $meta );
// Loop over meta.
foreach ( $meta as $name => $value ) {
acf_update_metadata( $to_post_id, $name, $value );
}
if ( $meta && $instance ) {
$instance->update_meta( $decoded['id'], $meta );
}
}
@ -382,3 +358,155 @@ function acf_update_metaref( $post_id = 0, $type = 'fields', $references = array
// Update metadata.
return acf_update_metadata( $post_id, "_acf_$type", $references );
}
/**
* Retrieves an ACF meta instance for the provided meta type.
*
* @since 6.4
*
* @param string $type The meta type as decoded from the post ID.
* @return object|null
*/
function acf_get_meta_instance( string $type ): ?object {
$instance = null;
$meta_locations = acf_get_store( 'acf-meta-locations' );
if ( $meta_locations && $meta_locations->has( $type ) ) {
$instance = acf_get_instance( $meta_locations->get( $type ) );
}
return $instance;
}
/**
* Gets metadata from the database.
*
* @since 6.4
*
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @param boolean $hidden True if we should return the reference key.
* @return mixed
*/
function acf_get_metadata_by_field( $post_id = 0, $field = array(), bool $hidden = false ) {
if ( empty( $field['name'] ) ) {
return null;
}
// Allow filter to short-circuit logic.
$null = apply_filters( 'acf/pre_load_metadata', null, $post_id, $field['name'], $hidden );
if ( $null !== null ) {
return ( $null === '__return_null' ) ? null : $null;
}
// Decode the $post_id for $type and $id.
$decoded = acf_decode_post_id( $post_id );
$id = $decoded['id'];
$type = $decoded['type'];
// Bail early if no $id (possible during new acf_form).
if ( ! $id ) {
return null;
}
$meta_instance = acf_get_meta_instance( $type );
if ( ! $meta_instance ) {
return false;
}
if ( $hidden ) {
return $meta_instance->get_reference( $id, $field['name'] );
}
return $meta_instance->get_value( $id, $field );
}
/**
* Updates metadata in the database.
*
* @since 6.4
*
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @param mixed $value The meta value.
* @param boolean $hidden True if we should update the reference key.
* @return integer|boolean Meta ID if the key didn't exist, true on successful update, false on failure.
*/
function acf_update_metadata_by_field( $post_id = 0, $field = array(), $value = '', bool $hidden = false ) {
if ( empty( $field['name'] ) ) {
return null;
}
// Allow filter to short-circuit logic.
$pre = apply_filters( 'acf/pre_update_metadata', null, $post_id, $field['name'], $value, $hidden );
if ( $pre !== null ) {
return $pre;
}
// Decode the $post_id for $type and $id.
$decoded = acf_decode_post_id( $post_id );
$id = $decoded['id'];
$type = $decoded['type'];
// Bail early if no $id (possible during new acf_form).
if ( ! $id ) {
return false;
}
$meta_instance = acf_get_meta_instance( $type );
if ( ! $meta_instance ) {
return false;
}
if ( $hidden ) {
return $meta_instance->update_reference( $id, $field['name'], $field['key'] );
}
return $meta_instance->update_value( $id, $field, $value );
}
/**
* Deletes metadata from the database.
*
* @since 6.4
*
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @param boolean $hidden True if we should update the reference key.
* @return boolean
*/
function acf_delete_metadata_by_field( $post_id = 0, $field = array(), bool $hidden = false ) {
if ( empty( $field['name'] ) ) {
return null;
}
// Allow filter to short-circuit logic.
$pre = apply_filters( 'acf/pre_delete_metadata', null, $post_id, $field['name'], $hidden );
if ( $pre !== null ) {
return $pre;
}
// Decode the $post_id for $type and $id.
$decoded = acf_decode_post_id( $post_id );
$id = $decoded['id'];
$type = $decoded['type'];
// Bail early if no $id (possible during new acf_form).
if ( ! $id ) {
return false;
}
$meta_instance = acf_get_meta_instance( $type );
if ( ! $meta_instance ) {
return false;
}
if ( $hidden ) {
return $meta_instance->delete_reference( $id, $field['name'] );
}
return $meta_instance->delete_value( $id, $field );
}

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* Returns available templates for each post type.

View File

@ -1,8 +1,12 @@
<?php
/**
* Functions for ACF post type objects.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**

View File

@ -1,8 +1,12 @@
<?php
/**
* Functions for ACF taxonomy objects.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* acf_get_users

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Globals.
global $acf_stores, $acf_instances;

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Register store.
acf_register_store( 'values' )->prop( 'multisite', true );
@ -13,18 +22,35 @@ acf_register_store( 'values' )->prop( 'multisite', true );
*
* @param string $field_name The name of the field. eg 'sub_heading'.
* @param mixed $post_id The post_id of which the value is saved against.
* @return string The field key.
* @return string|null The field key, or null on failure.
*/
function acf_get_reference( $field_name, $post_id ) {
// Allow filter to short-circuit load_value logic.
$reference = apply_filters( 'acf/pre_load_reference', null, $field_name, $post_id );
if ( $reference !== null ) {
return $reference;
}
// Back-compat.
$reference = apply_filters( 'acf/pre_load_metadata', null, $post_id, $field_name, true );
if ( $reference !== null ) {
return ( $reference === '__return_null' ) ? null : $reference;
}
$decoded = acf_decode_post_id( $post_id );
// Bail if no ID or type.
if ( empty( $decoded['id'] ) || empty( $decoded['type'] ) ) {
return null;
}
$meta_instance = acf_get_meta_instance( $decoded['type'] );
if ( ! $meta_instance ) {
return null;
}
// Get hidden meta for this field name.
$reference = acf_get_metadata( $post_id, $field_name, true );
$reference = $meta_instance->get_reference( $decoded['id'], $field_name );
/**
* Filters the reference value.
@ -78,7 +104,9 @@ function acf_get_value( $post_id, $field ) {
// If we're using a non options_ option key, ensure we have a valid reference key.
if ( 'option' === $decoded['type'] && 'options' !== $decoded['id'] ) {
$meta = acf_get_metadata( $post_id, $field_name, true );
// TODO: Move this into options meta class? i.e. return false
$meta = acf_get_metadata_by_field( $post_id, $field, true );
if ( ! $meta ) {
$allow_load = false;
} elseif ( $meta !== $field['key'] ) {
@ -97,7 +125,7 @@ function acf_get_value( $post_id, $field ) {
return $store->get( "$post_id:$field_name" );
}
$value = acf_get_metadata( $post_id, $field_name );
$value = acf_get_metadata_by_field( $post_id, $field );
}
// Use field's default_value if no meta was found.
@ -220,11 +248,9 @@ function acf_update_value( $value, $post_id, $field ) {
return acf_delete_value( $post_id, $field );
}
// Update meta.
$return = acf_update_metadata( $post_id, $field['name'], $value );
// Update reference.
acf_update_metadata( $post_id, $field['name'], $field['key'], true );
// Update value and reference key.
$return = acf_update_metadata_by_field( $post_id, $field, $value );
acf_update_metadata_by_field( $post_id, $field, $field['key'], true );
// Delete stored data.
acf_flush_value_cache( $post_id, $field['name'] );
@ -310,11 +336,9 @@ function acf_delete_value( $post_id, $field ) {
*/
do_action( 'acf/delete_value', $post_id, $field['name'], $field );
// Delete meta.
$return = acf_delete_metadata( $post_id, $field['name'] );
// Delete reference.
acf_delete_metadata( $post_id, $field['name'], true );
// Delete value and reference key.
$return = acf_delete_metadata_by_field( $post_id, $field );
acf_delete_metadata_by_field( $post_id, $field, true );
// Delete stored data.
acf_flush_value_cache( $post_id, $field['name'] );
@ -372,8 +396,8 @@ function acf_log_invalid_field_notice( $field, $function ) {
}
$error_text = sprintf(
/* translators: %1 plugin name, %2 the URL to the documentation on this error */
__( '<strong>%1$s</strong> - We\'ve detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. <a href="%2$s" target="_blank">Learn how to fix this</a>.', 'acf' ),
// This happens too early for translations to be loaded properly.
'<strong>%1$s</strong> - We\'ve detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. <a href="%2$s" target="_blank">Learn how to fix this</a>.',
acf_get_setting( 'name' ),
acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/acf-field-functions/', 'docs', 'early_init_warning' )
);

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* Returns a WordPress object type.
@ -195,6 +204,10 @@ function acf_decode_post_id( $post_id = 0 ) {
$type = taxonomy_exists( $type ) ? 'term' : 'blog';
$id = absint( $id );
break;
case 'woo_order_%d':
$type = 'woo_order';
$id = absint( $id );
break;
default:
// Check for taxonomy name.
if ( taxonomy_exists( $type ) && is_numeric( $id ) ) {

View File

@ -1,12 +1,12 @@
<?php
/**
* ACF Internal Post Type List class
*
* Base class to add functionality to ACF internal post type list pages.
*
* @package ACF
* @subpackage Admin
* @since 6.1
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -549,8 +549,8 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
foreach ( $activated as $activated_id ) {
$links[] = sprintf(
'<a href="%1$s">%2$s</a>',
get_edit_post_link( $activated_id ),
get_the_title( $activated_id )
esc_url( get_edit_post_link( $activated_id ) ),
esc_html( get_the_title( $activated_id ) )
);
}
@ -619,8 +619,8 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
foreach ( $deactivated as $deactivated_id ) {
$links[] = sprintf(
'<a href="%1$s">%2$s</a>',
get_edit_post_link( $deactivated_id ),
get_the_title( $deactivated_id )
esc_url( get_edit_post_link( $deactivated_id ) ),
esc_html( get_the_title( $deactivated_id ) )
);
}
@ -688,8 +688,8 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
foreach ( $duplicated as $duplicated_id ) {
$links[] = sprintf(
'<a href="%1$s">%2$s</a>',
get_edit_post_link( $duplicated_id ),
get_the_title( $duplicated_id )
esc_url( get_edit_post_link( $duplicated_id ) ),
esc_html( get_the_title( $duplicated_id ) )
);
}
@ -755,8 +755,8 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
foreach ( $synced as $synced_id ) {
$links[] = sprintf(
'<a href="%1$s">%2$s</a>',
get_edit_post_link( $synced_id ),
get_the_title( $synced_id )
esc_url( get_edit_post_link( $synced_id ) ),
esc_html( get_the_title( $synced_id ) )
);
}

View File

@ -1,12 +1,12 @@
<?php
/**
* ACF Internal Post Type class
*
* Base class to add functionality to ACF internal post types.
*
* @package ACF
* @subpackage Admin
* @since 6.1
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -45,7 +45,6 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type' ) ) :
add_action( 'current_screen', array( $this, 'current_screen' ) );
add_action( 'save_post_' . $this->post_type, array( $this, 'save_post' ), 10, 2 );
add_action( 'wp_ajax_acf/link_field_groups', array( $this, 'ajax_link_field_groups' ) );
add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
add_filter( 'use_block_editor_for_post_type', array( $this, 'use_block_editor_for_post_type' ), 10, 2 );
}
@ -92,6 +91,7 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type' ) ) :
acf_enqueue_scripts();
add_action( 'admin_body_class', array( $this, 'admin_body_class' ) );
add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
add_action( 'acf/input/admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
add_action( 'acf/input/admin_head', array( $this, 'admin_head' ) );
add_action( 'acf/input/form_data', array( $this, 'form_data' ) );

View File

@ -1,11 +1,12 @@
<?php
/**
* ACF Admin Notices
* @package ACF
* @author WP Engine
*
* Functions and classes to manage admin notices.
*
* @date 10/1/19
* @since 5.7.10
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Exit if accessed directly.

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;

View File

@ -1,21 +1,35 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! class_exists( 'acf_admin_tools' ) ) :
#[AllowDynamicProperties]
class acf_admin_tools {
/** @var array Contains an array of admin tool instances */
var $tools = array();
/** @var string The active tool */
var $active = '';
/**
* Contains an array of admin tool instances.
*
* @var array
*/
public $tools = array();
/**
* The active tool.
*
* @var string
*/
public $active = '';
/**
* __construct

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@ -19,6 +28,7 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
add_action( 'admin_body_class', array( $this, 'admin_body_class' ) );
add_action( 'current_screen', array( $this, 'current_screen' ) );
add_action( 'admin_notices', array( $this, 'maybe_show_escaped_html_notice' ) );
add_action( 'admin_notices', array( $this, 'maybe_show_select2_v3_deprecation_notice' ) );
add_action( 'admin_init', array( $this, 'dismiss_escaped_html_notice' ) );
add_action( 'admin_init', array( $this, 'clear_escaped_html_log' ) );
add_filter( 'parent_file', array( $this, 'ensure_menu_selection' ) );
@ -77,13 +87,8 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
public function admin_body_class( $classes ) {
global $wp_version;
// Determine body class version.
$wp_minor_version = floatval( $wp_version );
if ( $wp_minor_version >= 5.3 ) {
$classes .= ' acf-admin-5-3';
} else {
$classes .= ' acf-admin-3-8';
}
// Add body class.
$classes .= ' acf-admin-5-3';
// Add browser for specific CSS.
$classes .= ' acf-browser-' . esc_attr( acf_get_browser() );
@ -216,7 +221,7 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
}
// Allow opting-out of the notice.
if ( apply_filters( 'acf/admin/prevent_escaped_html_notice', false ) ) {
if ( apply_filters( 'acf/admin/prevent_escaped_html_notice', true ) ) {
return;
}
@ -284,6 +289,34 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
exit;
}
/**
* Notifies the user that Select2 v3 has been deprecated and will be removed.
*
* @since 6.4.3
*
* @return void
*/
public function maybe_show_select2_v3_deprecation_notice() {
// Only show to editors and above.
if ( ! current_user_can( 'edit_others_posts' ) ) {
return;
}
if ( 3 === acf_get_setting( 'select2_version' ) ) {
$acf_plugin_name = acf_is_pro() ? 'ACF PRO' : 'ACF';
$acf_plugin_name = '<strong>' . $acf_plugin_name . ' &mdash;</strong>';
$text = sprintf(
/* translators: %1$s - Plugin name, %2$s URL to documentation */
__( '%1$s We have detected that this website is configured to use v3 of the Select2 jQuery library, which has been deprecated in favor of v4 and will be removed in a future version of ACF. <a href="%2$s" target="_blank">Learn more</a>.', 'acf' ),
$acf_plugin_name,
acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/select2-v3-deprecation/', 'docs', 'select2-deprecation-notice' ),
);
acf_add_admin_notice( $text, 'warning', false );
}
}
/**
* Renders the admin navigation element.
*

View File

@ -1,11 +1,12 @@
<?php
/**
* ACF Admin Field Group Class
* @package ACF
* @author WP Engine
*
* @class acf_admin_field_group
*
* @package ACF
* @subpackage Admin
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! class_exists( 'acf_admin_field_group' ) ) :
@ -88,7 +89,6 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
'Move field group to trash?' => esc_html__( 'Move field group to trash?', 'acf' ),
'No toggle fields available' => esc_html__( 'No toggle fields available', 'acf' ),
'Move Custom Field' => esc_html__( 'Move Custom Field', 'acf' ),
'Close modal' => esc_html__( 'Close modal', 'acf' ),
'Field moved to other group' => esc_html__( 'Field moved to other group', 'acf' ),
'Field groups linked successfully.' => esc_html__( 'Field groups linked successfully.', 'acf' ),
'Checked' => esc_html__( 'Checked', 'acf' ),

View File

@ -1,17 +1,24 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! class_exists( 'ACF_Admin_Field_Groups' ) ) :
#[AllowDynamicProperties]
class ACF_Admin_Field_Groups extends ACF_Admin_Internal_Post_Type_List {
/**
* The slug for the internal post type.
*
* @since 6.1
* @var string
*/
public $post_type = 'acf-field-group';
@ -19,7 +26,6 @@ if ( ! class_exists( 'ACF_Admin_Field_Groups' ) ) :
/**
* The admin body class used for the post type.
*
* @since 6.1
* @var string
*/
public $admin_body_class = 'acf-admin-field-groups';
@ -80,7 +86,6 @@ if ( ! class_exists( 'ACF_Admin_Field_Groups' ) ) :
// Set the "no found" label to be our custom HTML for no results.
if ( empty( acf_request_arg( 's' ) ) ) {
global $wp_post_types;
$this->not_found_label = $wp_post_types['acf-field-group']->labels->not_found;
$wp_post_types['acf-field-group']->labels->not_found = $this->get_not_found_html();
}

View File

@ -1,11 +1,12 @@
<?php
/**
* ACF Admin Post Type Class
* @package ACF
* @author WP Engine
*
* @class ACF_Admin_Post_Type
*
* @package ACF
* @subpackage Admin
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! class_exists( 'ACF_Admin_Post_Type' ) ) :

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
@ -9,13 +18,11 @@ if ( ! class_exists( 'ACF_Admin_Post_Types' ) ) :
/**
* The ACF Post Types admin controller class
*/
#[AllowDynamicProperties]
class ACF_Admin_Post_Types extends ACF_Admin_Internal_Post_Type_List {
/**
* The slug for the internal post type.
*
* @since 6.1
* @var string
*/
public $post_type = 'acf-post-type';
@ -23,7 +30,6 @@ if ( ! class_exists( 'ACF_Admin_Post_Types' ) ) :
/**
* The admin body class used for the post type.
*
* @since 6.1
* @var string
*/
public $admin_body_class = 'acf-admin-post-types';
@ -100,7 +106,6 @@ if ( ! class_exists( 'ACF_Admin_Post_Types' ) ) :
// Set the "no found" label to be our custom HTML for no results.
if ( empty( acf_request_arg( 's' ) ) ) {
global $wp_post_types;
$this->not_found_label = $wp_post_types[ $this->post_type ]->labels->not_found;
$wp_post_types[ $this->post_type ]->labels->not_found = $this->get_not_found_html();
}

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
@ -9,13 +18,11 @@ if ( ! class_exists( 'ACF_Admin_Taxonomies' ) ) :
/**
* The ACF Post Types admin controller class
*/
#[AllowDynamicProperties]
class ACF_Admin_Taxonomies extends ACF_Admin_Internal_Post_Type_List {
/**
* The slug for the internal post type.
*
* @since 6.1
* @var string
*/
public $post_type = 'acf-taxonomy';
@ -23,7 +30,6 @@ if ( ! class_exists( 'ACF_Admin_Taxonomies' ) ) :
/**
* The admin body class used for the post type.
*
* @since 6.1
* @var string
*/
public $admin_body_class = 'acf-admin-taxonomies';
@ -99,7 +105,6 @@ if ( ! class_exists( 'ACF_Admin_Taxonomies' ) ) :
// Set the "no found" label to be our custom HTML for no results.
if ( empty( acf_request_arg( 's' ) ) ) {
global $wp_post_types;
$this->not_found_label = $wp_post_types[ $this->post_type ]->labels->not_found;
$wp_post_types[ $this->post_type ]->labels->not_found = $this->get_not_found_html();
}

View File

@ -1,11 +1,12 @@
<?php
/**
* ACF Admin Taxonomy Class
* @package ACF
* @author WP Engine
*
* @class ACF_Admin_Taxonomiy
*
* @package ACF
* @subpackage Admin
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! class_exists( 'ACF_Admin_Taxonomy' ) ) :

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@ -44,7 +53,7 @@ if ( ! class_exists( 'ACF_Admin_Tool_Import' ) ) :
?>
<div class="acf-postbox-header">
<h2 class="acf-postbox-title"><?php esc_html_e( 'Import', 'acf' ); ?></h2>
<div class="acf-tip"><i tabindex="0" class="acf-icon acf-icon-help acf-js-tooltip" title="<?php esc_attr_e( 'Select the Advanced Custom Fields JSON file you would like to import. When you click the import button below, ACF will import the items in that file.', 'acf' ); ?>">?</i></div>
<div class="acf-tip"><i tabindex="0" class="acf-icon acf-icon-help acf-js-tooltip" title="<?php esc_attr_e( 'Choose an ACF JSON file to import. Use only files from trusted sources, then click Import.', 'acf' ); ?>">?</i></div>
</div>
<div class="acf-postbox-inner">
<div class="acf-fields">
@ -52,11 +61,13 @@ if ( ! class_exists( 'ACF_Admin_Tool_Import' ) ) :
acf_render_field_wrap(
array(
'label' => __( 'Select File', 'acf' ),
'type' => 'file',
'name' => 'acf_import_file',
'value' => false,
'uploader' => 'basic',
'label' => __( 'Select JSON File', 'acf' ),
'type' => 'file',
'name' => 'acf_import_file',
'value' => false,
'uploader' => 'basic',
'mime_types' => 'application/json,application/x-json,application/x-javascript,text/javascript,text/x-javascript,text/json',
'instructions' => __( 'Import JSON containing field groups, post types, or taxonomies (trusted sources only)', 'acf' ),
)
);
@ -206,7 +217,7 @@ if ( ! class_exists( 'ACF_Admin_Tool_Import' ) ) :
// Add links to text.
$links = array();
foreach ( $ids as $id ) {
$links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
$links[] = '<a href="' . esc_url( get_edit_post_link( $id ) ) . '">' . esc_html( get_the_title( $id ) ) . '</a>';
}
$text .= ' ' . implode( ', ', $links );
@ -275,7 +286,7 @@ if ( ! class_exists( 'ACF_Admin_Tool_Import' ) ) :
// Add links to text.
$links = array();
foreach ( $imported as $id ) {
$links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
$links[] = '<a href="' . esc_url( get_edit_post_link( $id ) ) . '">' . esc_html( get_the_title( $id ) ) . '</a>';
}
$text .= ' ' . implode( ', ', $links );

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// vars
$disabled = false;

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
//phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included template file.
// Define input name prefix using unique identifier.

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
//phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template include file
$field_groups = acf_get_field_groups();
$num_field_groups = 0;

View File

@ -1,11 +1,15 @@
<?php
/**
* The empty list state for an ACF field group
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
?><script>document.body.classList.add('acf-no-field-groups');</script>
?>
<script>document.body.classList.add('acf-no-field-groups');</script>
<div class="acf-no-field-groups-wrapper">
<div class="acf-no-field-groups-inner">
<img src="<?php echo esc_url( acf_get_url( 'assets/images/empty-group.svg' ) ); ?>" />

View File

@ -1,3 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
?>
<div class="rule-group" data-id="<?php echo esc_attr( $group_id ); ?>">
<h4><?php echo ( $group_id == 'group_0' ) ? esc_html__( 'Show this field group if', 'acf' ) : esc_html__( 'or', 'acf' ); ?></h4>

View File

@ -1,8 +1,16 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// vars
$prefix = 'acf_field_group[location][' . $rule['group'] . '][' . $rule['id'] . ']';
?>
<tr data-id="<?php echo esc_attr( $rule['id'] ); ?>">
<td class="param">

View File

@ -1,8 +1,16 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// global
global $field_group;
?>
<div class="acf-field">
<div class="acf-label">

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// global
global $field_group;
@ -72,6 +81,8 @@ foreach ( acf_get_combined_field_group_settings_tabs() as $tab_key => $tab_label
case 'location_rules':
echo '<div class="field-group-locations field-group-settings-tab">';
acf_get_view( 'acf-field-group/locations' );
do_action( 'acf/field_group/render_additional_location_settings', $field_group );
echo '</div>';
break;
case 'presentation':
@ -164,6 +175,8 @@ foreach ( acf_get_combined_field_group_settings_tabs() as $tab_key => $tab_label
'field'
);
do_action( 'acf/field_group/render_additional_presentation_settings', $field_group );
echo '</div>';
echo '<div class="field-group-setting-split">';
@ -221,8 +234,6 @@ foreach ( acf_get_combined_field_group_settings_tabs() as $tab_key => $tab_label
'prefix' => 'acf_field_group',
'value' => $field_group['active'],
'ui' => 1,
// 'ui_on_text' => __('Active', 'acf'),
// 'ui_off_text' => __('Inactive', 'acf'),
)
);
@ -237,8 +248,6 @@ foreach ( acf_get_combined_field_group_settings_tabs() as $tab_key => $tab_label
'prefix' => 'acf_field_group',
'value' => $field_group['show_in_rest'],
'ui' => 1,
// 'ui_on_text' => __('Active', 'acf'),
// 'ui_off_text' => __('Inactive', 'acf'),
)
);
}
@ -257,6 +266,21 @@ foreach ( acf_get_combined_field_group_settings_tabs() as $tab_key => $tab_label
'field'
);
acf_render_field_wrap(
array(
'label' => __( 'Display Title', 'acf' ),
'instructions' => __( 'Title shown on the edit screen for the field group meta box to use instead of the field group title', 'acf' ),
'type' => 'text',
'name' => 'display_title',
'prefix' => 'acf_field_group',
'value' => $field_group['display_title'],
),
'div',
'field'
);
do_action( 'acf/field_group/render_additional_group_settings', $field_group );
/* translators: 1: Post creation date 2: Post creation time */
$acf_created_on = sprintf( __( 'Created on %1$s at %2$s', 'acf' ), get_the_date(), get_the_time() );
?>

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
$acf_field_group_pro_features_title = __( 'Unlock Advanced Features and Build Even More with ACF PRO', 'acf' );
$acf_learn_more_text = __( 'Learn More', 'acf' );
$acf_learn_more_link = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'ACF upgrade', 'metabox' );

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
global $acf_post_type;

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
global $acf_post_type;
$acf_duplicate_post_type = acf_get_post_type_from_request_args( 'acfduplicate' );

View File

@ -1,11 +1,15 @@
<?php
/**
* The empty list state for an ACF post type.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
?><script>document.body.classList.add('acf-no-post-types');</script>
?>
<script>document.body.classList.add('acf-no-post-types');</script>
<div class="acf-no-post-types-wrapper">
<div class="acf-no-post-types-inner">
<img src="<?php echo esc_url( acf_get_url( 'assets/images/empty-post-types.svg' ) ); ?>" />

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
global $acf_taxonomy;

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
global $acf_taxonomy;

View File

@ -1,10 +1,13 @@
<?php
/**
* The empty list state for an ACF taxonomy.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
?>
<script>document.body.classList.add('acf-no-taxonomies');</script>
<div class="acf-no-taxonomies-wrapper">

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
//phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included template file.
$browse_fields_tabs = array( 'popular' => __( 'Popular', 'acf' ) );

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
$acf_plugin_name = acf_is_pro() ? 'ACF PRO' : 'ACF';
$acf_plugin_name = '<strong>' . $acf_plugin_name . ' &mdash;</strong>';

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
global $title, $post_new_file, $post_type_object, $post;
$acf_title_placeholder = apply_filters( 'enter_title_here', __( 'Add title' ), $post );
$acf_title = $post->post_title;

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
//phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included template file.
global $post_type, $post_type_object, $acf_page_title;

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
//phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included template file.
/**
* The template for displaying admin navigation.
@ -93,10 +103,11 @@ if ( ! defined( 'PWP_NAME' ) ) {
$acf_wpengine_logo = sprintf( '<span><img class="acf-wp-engine-pro" src="%s" alt="WP Engine" /></span>', $acf_wpengine_logo );
$utm_content = acf_is_pro() ? 'acf_pro_plugin_topbar_dropdown_cta' : 'acf_free_plugin_topbar_dropdown_cta';
$wpengine_more_items[] = array(
'url' => acf_add_url_utm_tags( 'https://wpengine.com/plans/?coupon=freedomtocreate', 'bx_prod_referral', $utm_content, false, 'acf_plugin', 'referral' ),
'text' => $acf_wpengine_logo . '<span class="acf-wp-engine-upsell-pill">' . __( '4 Months Free', 'acf' ) . '</span>',
'target' => '_blank',
'li_class' => 'acf-wp-engine',
'url' => acf_add_url_utm_tags( 'https://wpengine.com/plans/?coupon=freedomtocreate', 'bx_prod_referral', $utm_content, false, 'acf_plugin', 'referral' ),
'text' => $acf_wpengine_logo . '<span class="acf-wp-engine-upsell-pill">' . __( '4 Months Free', 'acf' ) . '</span>',
'target' => '_blank',
'li_class' => 'acf-wp-engine',
'aria-label' => __( 'Get 4 months free on any WP Engine plan', 'acf' ),
);
}
@ -142,16 +153,18 @@ function acf_print_menu_section( $menu_items, $section = '' ) {
$section_html = '';
foreach ( $menu_items as $menu_item ) {
$class = ! empty( $menu_item['class'] ) ? $menu_item['class'] : $menu_item['text'];
$target = ! empty( $menu_item['target'] ) ? ' target="' . esc_attr( $menu_item['target'] ) . '"' : '';
$li_class = ! empty( $menu_item['li_class'] ) ? esc_attr( $menu_item['li_class'] ) : '';
$class = ! empty( $menu_item['class'] ) ? $menu_item['class'] : $menu_item['text'];
$target = ! empty( $menu_item['target'] ) ? ' target="' . esc_attr( $menu_item['target'] ) . '"' : '';
$aria_label = ! empty( $menu_item['aria-label'] ) ? ' aria-label="' . esc_attr( $menu_item['aria-label'] ) . '"' : '';
$li_class = ! empty( $menu_item['li_class'] ) ? esc_attr( $menu_item['li_class'] ) : '';
$html = sprintf(
'<a class="acf-tab%s %s" href="%s"%s><i class="acf-icon"></i>%s</a>',
'<a class="acf-tab%s %s" href="%s"%s%s><i class="acf-icon"></i>%s</a>',
! empty( $menu_item['is_active'] ) ? ' is-active' : '',
'acf-header-tab-' . esc_attr( acf_slugify( $class ) ),
esc_url( $menu_item['url'] ),
$target,
$aria_label,
acf_esc_html( $menu_item['text'] )
);
@ -173,11 +186,11 @@ function acf_print_menu_section( $menu_items, $section = '' ) {
<div class="acf-admin-toolbar-inner">
<div class="acf-nav-wrap">
<?php if ( acf_is_pro() && acf_pro_is_license_active() ) { ?>
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo pro">
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo pro" aria-label="<?php esc_attr_e( 'Edit ACF Field Groups', 'acf' ); ?>">
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-pro-logo.svg' ) ); ?>" alt="<?php esc_attr_e( 'Advanced Custom Fields logo', 'acf' ); ?>">
</a>
<?php } else { ?>
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo">
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo" aria-label="<?php esc_attr_e( 'Edit ACF Field Groups', 'acf' ); ?>">
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-logo.svg' ) ); ?>" alt="<?php esc_attr_e( 'Advanced Custom Fields logo', 'acf' ); ?>">
</a>
<?php } ?>
@ -234,7 +247,7 @@ function acf_print_menu_section( $menu_items, $section = '' ) {
<?php
}
?>
<a href="<?php echo $acf_wpengine_logo_link; ?>" target="_blank" class="acf-nav-wpengine-logo"><?php //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped on generation. ?>
<a href="<?php echo $acf_wpengine_logo_link; ?>" target="_blank" class="acf-nav-wpengine-logo" aria-label="<?php esc_attr_e( 'WP Engine', 'acf' ); ?>"><?php //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped on generation. ?>
<img src="<?php echo esc_url( acf_get_url( 'assets/images/wp-engine-horizontal-white.svg' ) ); ?>" alt="<?php esc_html_e( 'WP Engine logo', 'acf' ); ?>" />
</a>
</div>

View File

@ -1,4 +1,14 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
$acf_learn_more_link = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'ACF upgrade', 'no-options-pages' );
$acf_upgrade_button = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'ACF upgrade', 'no-options-pages-pricing', 'pricing-table' );

View File

@ -1,8 +1,12 @@
<?php
/**
* View to output admin tools for both archive and single
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
$class = $active ? 'single' : 'grid';
@ -10,10 +14,12 @@ $tool = $active ? ' tool-' . $active : '';
?>
<div id="acf-admin-tools" class="wrap<?php echo esc_attr( $tool ); ?>">
<h1><?php esc_html_e( 'Tools', 'acf' ); ?> <?php
if ( $active ) :
?>
<a class="page-title-action" href="<?php echo esc_url( acf_get_admin_tools_url() ); ?>"><?php esc_html_e( 'Back to all tools', 'acf' ); ?></a><?php endif; ?></h1>
<h1>
<?php esc_html_e( 'Tools', 'acf' ); ?>
<?php if ( $active ) { ?>
<a class="page-title-action" href="<?php echo esc_url( acf_get_admin_tools_url() ); ?>"><?php esc_html_e( 'Back to all tools', 'acf' ); ?></a>
<?php } ?>
</h1>
<div class="acf-meta-box-wrap -<?php echo esc_attr( $class ); ?>">
<?php do_meta_boxes( $screen_id, 'normal', '' ); ?>

View File

@ -1,12 +1,13 @@
<?php
/**
* Network Admin Database Upgrade
*
* Shows the databse upgrade process.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
?>
<style type="text/css">
@ -73,8 +74,16 @@
</td>
<td>
<?php if ( acf_has_upgrade() ) : ?>
<?php // translators: %1 current db version, %2 available db version ?>
<span class="response"><?php echo esc_html( printf( __( 'Site requires database upgrade from %1$s to %2$s', 'acf' ), acf_get_db_version(), ACF_VERSION ) ); ?></span>
<span class="response">
<?php
printf(
/* translators: %1$s current db version, %2$s available db version */
esc_html__( 'Site requires database upgrade from %1$s to %2$s', 'acf' ),
esc_html( acf_get_db_version() ),
esc_html( ACF_VERSION )
);
?>
</span>
<?php else : ?>
<?php esc_html_e( 'Site is up to date', 'acf' ); ?>
<?php endif; ?>

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// calculate add-ons (non pro only)
$plugins = array();
@ -19,7 +28,7 @@ if ( ! acf_get_setting( 'pro' ) ) {
}
?>
<div id="acf-upgrade-notice" class="notice">
<div id="acf-upgrade-notice" class="notice notice-warning">
<div class="notice-container">
<div class="col-content">
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-logo.svg' ) ); ?>" />
@ -33,7 +42,7 @@ if ( ! acf_get_setting( 'pro' ) ) {
<?php endif; ?>
</div>
<div class="col-actions">
<a id="acf-upgrade-button" href="<?php echo esc_url( $button_url ); ?>" class="acf-btn"><?php echo esc_html( $button_text ); ?></a>
<a id="acf-upgrade-button" href="<?php echo esc_url( $button_url ); ?>" class="button-primary"><?php echo esc_html( $button_text ); ?></a>
</div>
</div>

View File

@ -1,12 +1,13 @@
<?php
/**
* Admin Database Upgrade
*
* Shows the databse upgrade process.
*
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
?>
<style type="text/css">

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@ -51,14 +60,14 @@ if ( ! class_exists( 'ACF_Ajax_Check_Screen' ) ) :
// vars
$item = array(
'id' => 'acf-' . $field_group['key'],
'key' => $field_group['key'],
'title' => $field_group['title'],
'position' => $field_group['position'],
'id' => esc_attr( 'acf-' . $field_group['key'] ),
'key' => esc_attr( $field_group['key'] ),
'title' => acf_esc_html( acf_get_field_group_title( $field_group ) ),
'position' => esc_attr( $field_group['position'] ),
'classes' => postbox_classes( 'acf-' . $field_group['key'], $args['screen'] ),
'style' => $field_group['style'],
'label' => $field_group['label_placement'],
'edit' => acf_get_field_group_edit_link( $field_group['ID'] ),
'style' => esc_attr( $field_group['style'] ),
'label' => esc_attr( $field_group['label_placement'] ),
'edit' => esc_url( acf_get_field_group_edit_link( $field_group['ID'] ) ),
'html' => '',
);
@ -68,6 +77,8 @@ if ( ! class_exists( 'ACF_Ajax_Check_Screen' ) ) :
$item['classes'] = trim( $item['classes'] . ' hide-if-js' );
}
$item['classes'] = esc_attr( $item['classes'] );
// append html if doesnt already exist on page
if ( ! in_array( $field_group['key'], $args['exists'] ) ) {

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* This function will return true for a non empty array
@ -1287,8 +1296,19 @@ function acf_get_grouped_posts( $args ) {
// find array of post_type
$post_types = acf_get_array( $args['post_type'] );
$post_types_labels = acf_get_pretty_post_types( $post_types );
$is_single_post_type = ( count( $post_types ) == 1 );
$is_single_post_type = ( count( $post_types ) === 1 );
// WordPress 6.8+ sorts post_type arrays for cache key generation
// We need to use the same sorted order when processing results
if (
! $is_single_post_type &&
$args['posts_per_page'] !== -1 &&
version_compare( get_bloginfo( 'version' ), '6.8', '>=' )
) {
sort( $post_types );
}
$post_types_labels = acf_get_pretty_post_types( $post_types );
// attachment doesn't work if it is the only item in an array
if ( $is_single_post_type ) {

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* This function will return a custom field value for a specific field name/key + post_id.
@ -142,7 +151,7 @@ function the_field( $selector, $post_id = false, $format_value = true ) {
*/
function _acf_log_escaped_html( $function, $selector, $field, $post_id ) {
// If the notice isn't shown, no use in logging the errors.
if ( apply_filters( 'acf/admin/prevent_escaped_html_notice', false ) ) {
if ( apply_filters( 'acf/admin/prevent_escaped_html_notice', true ) ) {
return;
}

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
/**
* Returns an array of taxonomy names.

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@ -323,35 +332,32 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
/**
* Enqueues and localizes scripts.
*
* @date 27/4/20
* @since 5.9.0
* @since 5.9.0
*
* @param void
* @return void
* @return void
*/
public function enqueue_scripts() {
// Enqueue input scripts.
if ( in_array( 'input', $this->enqueue ) ) {
if ( in_array( 'input', $this->enqueue, true ) ) {
wp_enqueue_script( 'acf-input' );
wp_enqueue_style( 'acf-input' );
}
// Enqueue media scripts.
if ( in_array( 'uploader', $this->enqueue ) ) {
if ( in_array( 'uploader', $this->enqueue, true ) ) {
$this->enqueue_uploader();
}
// Localize text.
acf_localize_text(
array(
// Tooltip
'Are you sure?' => __( 'Are you sure?', 'acf' ),
'Yes' => __( 'Yes', 'acf' ),
'No' => __( 'No', 'acf' ),
'Remove' => __( 'Remove', 'acf' ),
'Cancel' => __( 'Cancel', 'acf' ),
'Are you sure?' => esc_html__( 'Are you sure?', 'acf' ),
'Yes' => esc_html__( 'Yes', 'acf' ),
'No' => esc_html__( 'No', 'acf' ),
'Remove' => esc_html__( 'Remove', 'acf' ),
'Cancel' => esc_html__( 'Cancel', 'acf' ),
'Close modal' => esc_html__( 'Close modal', 'acf' ),
)
);
@ -359,30 +365,31 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
if ( wp_script_is( 'acf-input' ) ) {
acf_localize_text(
array(
// Unload
'The changes you made will be lost if you navigate away from this page' => __( 'The changes you made will be lost if you navigate away from this page', 'acf' ),
'The changes you made will be lost if you navigate away from this page' => esc_html__( 'The changes you made will be lost if you navigate away from this page', 'acf' ),
// Metaboxes
'Toggle panel' => __( 'Toggle panel', 'acf' ),
// Validation
'Validation successful' => __( 'Validation successful', 'acf' ),
'Validation failed' => __( 'Validation failed', 'acf' ),
'1 field requires attention' => __( '1 field requires attention', 'acf' ),
'%d fields require attention' => __( '%d fields require attention', 'acf' ),
'Validation successful' => esc_html__( 'Validation successful', 'acf' ),
'Validation failed' => esc_html__( 'Validation failed', 'acf' ),
'1 field requires attention' => esc_html__( '1 field requires attention', 'acf' ),
/* translators: %d is the number of fields that require attention */
'%d fields require attention' => esc_html__( '%d fields require attention', 'acf' ),
// Block Validation
'An ACF Block on this page requires attention before you can save.' => __( 'An ACF Block on this page requires attention before you can save.', 'acf' ),
'An ACF Block on this page requires attention before you can save.' => esc_html__( 'An ACF Block on this page requires attention before you can save.', 'acf' ),
// Other
'Edit field group' => __( 'Edit field group', 'acf' ),
'Edit field group' => esc_html__( 'Edit field group', 'acf' ),
)
);
/**
* Fires during "admin_enqueue_scripts" when ACF scripts are enqueued.
*
* @since 5.6.9
*
* @param void
* @since 5.6.9
*/
do_action( 'acf/input/admin_enqueue_scripts' );
}
@ -390,9 +397,7 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
/**
* Fires during "admin_enqueue_scripts" when ACF scripts are enqueued.
*
* @since 5.6.9
*
* @param void
* @since 5.6.9
*/
do_action( 'acf/admin_enqueue_scripts' );
do_action( 'acf/enqueue_scripts' );
@ -404,6 +409,7 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
$text[ $k ] = $v;
}
}
if ( $text ) {
wp_localize_script( 'acf', 'acfL10n', $text );
}

View File

@ -1,24 +1,56 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! class_exists( 'ACF_Data' ) ) :
#[AllowDynamicProperties]
class ACF_Data {
/** @var string Unique identifier. */
var $cid = '';
/**
* Unique identifier.
* @var string
*/
public $cid = '';
/** @var array Storage for data. */
var $data = array();
/**
* Storage for data.
* @var array
*/
public $data = array();
/** @var array Storage for data aliases. */
var $aliases = array();
/**
* Storage for data aliases.
* @var array
*/
public $aliases = array();
/** @var boolean Enables unique data per site. */
var $multisite = false;
/**
* Enables unique data per site.
* @var boolean
*/
public $multisite = false;
/**
* Storage for multisite data.
* @var array
*/
public $site_data = array();
/**
* Storage for multisite aliases.
* @var array
*/
public $site_aliases = array();
/**
* __construct

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
@ -165,7 +174,7 @@ if ( ! class_exists( 'ACF_Internal_Post_Type' ) ) {
* @since 6.1
*
* @param integer|string $id The post ID, key, or name.
* @return WP_Post|bool The post object, or false on failure.
* @return WP_Post|boolean The post object, or false on failure.
*/
public function get_post_object( $id = 0 ) {
if ( is_numeric( $id ) ) {
@ -731,7 +740,12 @@ if ( ! class_exists( 'ACF_Internal_Post_Type' ) ) {
// When importing a new field group, insert a temporary post and set the field group's ID.
// This allows fields to be updated before the field group (field group ID is needed for field parent setting).
if ( ! $post['ID'] ) {
$post['ID'] = wp_insert_post( array( 'post_title' => $post['key'] ) );
$post['ID'] = wp_insert_post(
array(
'post_title' => $post['key'],
'post_type' => $this->post_type,
)
);
}
$post = $this->update_post( $post );

View File

@ -1,719 +0,0 @@
<?php
/**
* Adds helpful debugging information to a new "Advanced Custom Fields"
* panel in the WordPress Site Health screen.
*
* @package ACF
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'ACF_Site_Health' ) ) {
/**
* The ACF Site Health class responsible for populating ACF debug information in WordPress Site Health.
*/
class ACF_Site_Health {
/**
* The option name used to store site health data.
*
* @var string
*/
public string $option_name = 'acf_site_health';
/**
* Constructs the ACF_Site_Health class.
*
* @since 6.3
*/
public function __construct() {
add_action( 'debug_information', array( $this, 'render_tab_content' ) );
add_action( 'acf_update_site_health_data', array( $this, 'update_site_health_data' ) );
if ( ! wp_next_scheduled( 'acf_update_site_health_data' ) ) {
wp_schedule_event( time(), 'weekly', 'acf_update_site_health_data' );
}
// ACF events.
add_action( 'acf/first_activated', array( $this, 'add_activation_event' ) );
add_action( 'acf/activated_pro', array( $this, 'add_activation_event' ) );
add_filter( 'acf/pre_update_field_group', array( $this, 'pre_update_acf_internal_cpt' ) );
add_filter( 'acf/pre_update_post_type', array( $this, 'pre_update_acf_internal_cpt' ) );
add_filter( 'acf/pre_update_taxonomy', array( $this, 'pre_update_acf_internal_cpt' ) );
add_filter( 'acf/pre_update_ui_options_page', array( $this, 'pre_update_acf_internal_cpt' ) );
}
/**
* Gets the stored site health information.
*
* @since 6.3
*
* @return array
*/
public function get_site_health(): array {
$site_health = get_option( $this->option_name, '' );
if ( is_string( $site_health ) ) {
$site_health = json_decode( $site_health, true );
}
return is_array( $site_health ) ? $site_health : array();
}
/**
* Updates the site health information.
*
* @since 6.3
*
* @param array $data An array of site health information to update.
* @return boolean
*/
public function update_site_health( array $data = array() ): bool {
return update_option( $this->option_name, wp_json_encode( $data ), false );
}
/**
* Stores debug data in the ACF site health option.
*
* @since 6.3
*
* @param array $data Data to update with (optional).
* @return boolean
*/
public function update_site_health_data( array $data = array() ): bool {
if ( wp_doing_cron() ) {
// Bootstrap wp-admin, as WP_Cron doesn't do this for us.
require_once trailingslashit( ABSPATH ) . 'wp-admin/includes/admin.php';
}
$site_health = $this->get_site_health();
$values = ! empty( $data ) ? $data : $this->get_site_health_values();
$updated = array();
if ( ! empty( $values ) ) {
foreach ( $values as $key => $value ) {
$updated[ $key ] = $value['debug'] ?? $value['value'];
}
}
foreach ( $site_health as $key => $value ) {
if ( 'event_' === substr( $key, 0, 6 ) ) {
$updated[ $key ] = $value;
}
}
$updated['last_updated'] = time();
return $this->update_site_health( $updated );
}
/**
* Pushes an event to the ACF site health option.
*
* @since 6.3
*
* @param string $event_name The name of the event to push.
* @return boolean
*/
public function add_site_health_event( string $event_name = '' ): bool {
$site_health = $this->get_site_health();
// Allow using action/filter hooks to set events.
if ( empty( $event_name ) ) {
$current_filter = current_filter();
if ( strpos( $current_filter, 'acf/' ) !== false ) {
$event_name = str_replace( 'acf/', '', $current_filter );
}
}
// Bail if this event was already stored.
if ( empty( $event_name ) || ! empty( $site_health[ 'event_' . $event_name ] ) ) {
return false;
}
$time = time();
$site_health[ 'event_' . $event_name ] = $time;
$site_health['last_updated'] = $time;
return $this->update_site_health( $site_health );
}
/**
* Logs activation events for free/pro.
*
* @since 6.3
*
* @return boolean
*/
public function add_activation_event() {
$event_name = 'first_activated';
if ( acf_is_pro() ) {
$event_name = 'first_activated_pro';
if ( 'acf/first_activated' !== current_filter() ) {
$site_health = $this->get_site_health();
/**
* We already have an event for when pro was first activated,
* so we don't need to log an additional event here.
*/
if ( ! empty( $site_health[ 'event_' . $event_name ] ) ) {
return false;
}
$event_name = 'activated_pro';
}
}
return $this->add_site_health_event( $event_name );
}
/**
* Adds events when ACF internal post types are created.
*
* @since 6.3
*
* @param array $post The post about to be updated.
* @return array
*/
public function pre_update_acf_internal_cpt( array $post = array() ): array {
if ( empty( $post['key'] ) ) {
return $post;
}
$post_type = acf_determine_internal_post_type( $post['key'] );
if ( $post_type ) {
$posts = acf_get_internal_post_type_posts( $post_type );
if ( empty( $posts ) ) {
$post_type = str_replace(
array(
'acf-',
'-',
),
array(
'',
'_',
),
$post_type
);
$this->add_site_health_event( 'first_created_' . $post_type );
}
}
return $post;
}
/**
* Appends the ACF section to the "Info" tab of the WordPress Site Health screen.
*
* @since 6.3
*
* @param array $debug_info The current debug info for site health.
* @return array The debug info appended with the ACF section.
*/
public function render_tab_content( array $debug_info ): array {
$data = $this->get_site_health_values();
$this->update_site_health_data( $data );
// Unset values we don't want to display yet.
$fields_to_unset = array(
'wp_version',
'mysql_version',
'is_multisite',
'active_theme',
'parent_theme',
'active_plugins',
'number_of_fields_by_type',
'number_of_third_party_fields_by_type',
);
foreach ( $fields_to_unset as $field ) {
if ( isset( $data[ $field ] ) ) {
unset( $data[ $field ] );
}
}
foreach ( $data as $key => $value ) {
if ( 'event_' === substr( $key, 0, 6 ) ) {
unset( $data[ $key ] );
}
}
$debug_info['acf'] = array(
'label' => __( 'ACF', 'acf' ),
'description' => __( 'This section contains debug information about your ACF configuration which can be useful to provide to support.', 'acf' ),
'fields' => $data,
);
return $debug_info;
}
/**
* Gets the values for all data in the ACF site health section.
*
* @since 6.3
*
* @return array
*/
public function get_site_health_values(): array {
global $wpdb;
$fields = array();
$is_pro = acf_is_pro();
$license = $is_pro ? acf_pro_get_license() : array();
$license_status = $is_pro ? acf_pro_get_license_status() : array();
$field_groups = acf_get_field_groups();
$post_types = acf_get_post_types();
$taxonomies = acf_get_taxonomies();
$yes = __( 'Yes', 'acf' );
$no = __( 'No', 'acf' );
$fields['version'] = array(
'label' => __( 'Plugin Version', 'acf' ),
'value' => defined( 'ACF_VERSION' ) ? ACF_VERSION : '',
);
$fields['plugin_type'] = array(
'label' => __( 'Plugin Type', 'acf' ),
'value' => $is_pro ? __( 'PRO', 'acf' ) : __( 'Free', 'acf' ),
'debug' => $is_pro ? 'PRO' : 'Free',
);
$fields['update_source'] = array(
'label' => __( 'Update Source', 'acf' ),
'value' => apply_filters( 'acf/site_health/update_source', __( 'wordpress.org', 'acf' ) ),
);
if ( $is_pro ) {
$fields['activated'] = array(
'label' => __( 'License Activated', 'acf' ),
'value' => ! empty( $license ) ? $yes : $no,
'debug' => ! empty( $license ),
);
$fields['activated_url'] = array(
'label' => __( 'Licensed URL', 'acf' ),
'value' => ! empty( $license['url'] ) ? $license['url'] : '',
);
$fields['license_type'] = array(
'label' => __( 'License Type', 'acf' ),
'value' => $license_status['name'],
);
$fields['license_status'] = array(
'label' => __( 'License Status', 'acf' ),
'value' => $license_status['status'],
);
$expiry = ! empty( $license_status['expiry'] ) ? $license_status['expiry'] : '';
$format = get_option( 'date_format', 'F j, Y' );
$fields['subscription_expires'] = array(
'label' => __( 'Subscription Expiry Date', 'acf' ),
'value' => is_numeric( $expiry ) ? date_i18n( $format, $expiry ) : '',
'debug' => $expiry,
);
}
$fields['wp_version'] = array(
'label' => __( 'WordPress Version', 'acf' ),
'value' => get_bloginfo( 'version' ),
);
$fields['mysql_version'] = array(
'label' => __( 'MySQL Version', 'acf' ),
'value' => $wpdb->db_server_info(),
);
$fields['is_multisite'] = array(
'label' => __( 'Is Multisite', 'acf' ),
'value' => is_multisite() ? __( 'Yes', 'acf' ) : __( 'No', 'acf' ),
'debug' => is_multisite(),
);
$active_theme = wp_get_theme();
$parent_theme = $active_theme->parent();
$fields['active_theme'] = array(
'label' => __( 'Active Theme', 'acf' ),
'value' => array(
'name' => $active_theme->get( 'Name' ),
'version' => $active_theme->get( 'Version' ),
'theme_uri' => $active_theme->get( 'ThemeURI' ),
'stylesheet' => $active_theme->get( 'Stylesheet' ),
),
);
if ( $parent_theme ) {
$fields['parent_theme'] = array(
'label' => __( 'Parent Theme', 'acf' ),
'value' => array(
'name' => $parent_theme->get( 'Name' ),
'version' => $parent_theme->get( 'Version' ),
'theme_uri' => $parent_theme->get( 'ThemeURI' ),
'stylesheet' => $parent_theme->get( 'Stylesheet' ),
),
);
}
$active_plugins = array();
$plugins = get_plugins();
foreach ( $plugins as $plugin_path => $plugin ) {
if ( ! is_plugin_active( $plugin_path ) ) {
continue;
}
$active_plugins[ $plugin_path ] = array(
'name' => $plugin['Name'],
'version' => $plugin['Version'],
'plugin_uri' => empty( $plugin['PluginURI'] ) ? '' : $plugin['PluginURI'],
);
}
$fields['active_plugins'] = array(
'label' => __( 'Active Plugins', 'acf' ),
'value' => $active_plugins,
);
$ui_field_groups = array_filter(
$field_groups,
function ( $field_group ) {
return empty( $field_group['local'] );
}
);
$fields['ui_field_groups'] = array(
'label' => __( 'Registered Field Groups (UI)', 'acf' ),
'value' => number_format_i18n( count( $ui_field_groups ) ),
);
$php_field_groups = array_filter(
$field_groups,
function ( $field_group ) {
return ! empty( $field_group['local'] ) && 'PHP' === $field_group['local'];
}
);
$fields['php_field_groups'] = array(
'label' => __( 'Registered Field Groups (PHP)', 'acf' ),
'value' => number_format_i18n( count( $php_field_groups ) ),
);
$json_field_groups = array_filter(
$field_groups,
function ( $field_group ) {
return ! empty( $field_group['local'] ) && 'json' === $field_group['local'];
}
);
$fields['json_field_groups'] = array(
'label' => __( 'Registered Field Groups (JSON)', 'acf' ),
'value' => number_format_i18n( count( $json_field_groups ) ),
);
$rest_field_groups = array_filter(
$field_groups,
function ( $field_group ) {
return ! empty( $field_group['show_in_rest'] );
}
);
$fields['rest_field_groups'] = array(
'label' => __( 'Field Groups Enabled for REST API', 'acf' ),
'value' => number_format_i18n( count( $rest_field_groups ) ),
);
$graphql_field_groups = array_filter(
$field_groups,
function ( $field_group ) {
return ! empty( $field_group['show_in_graphql'] );
}
);
if ( is_plugin_active( 'wpgraphql-acf/wpgraphql-acf.php' ) ) {
$fields['graphql_field_groups'] = array(
'label' => __( 'Field Groups Enabled for GraphQL', 'acf' ),
'value' => number_format_i18n( count( $graphql_field_groups ) ),
);
}
$all_fields = array();
foreach ( $field_groups as $field_group ) {
$all_fields = array_merge( $all_fields, acf_get_fields( $field_group ) );
}
$fields_by_type = array();
$third_party_fields_by_type = array();
$core_field_types = array_keys( acf_get_field_types() );
foreach ( $all_fields as $field ) {
if ( in_array( $field['type'], $core_field_types, true ) ) {
if ( ! isset( $fields_by_type[ $field['type'] ] ) ) {
$fields_by_type[ $field['type'] ] = 0;
}
++$fields_by_type[ $field['type'] ];
continue;
}
if ( ! isset( $third_party_fields_by_type[ $field['type'] ] ) ) {
$third_party_fields_by_type[ $field['type'] ] = 0;
}
++$third_party_fields_by_type[ $field['type'] ];
}
$fields['number_of_fields_by_type'] = array(
'label' => __( 'Number of Fields by Field Type', 'acf' ),
'value' => $fields_by_type,
);
$fields['number_of_third_party_fields_by_type'] = array(
'label' => __( 'Number of Third Party Fields by Field Type', 'acf' ),
'value' => $third_party_fields_by_type,
);
$enable_post_types = acf_get_setting( 'enable_post_types' );
$fields['post_types_enabled'] = array(
'label' => __( 'Post Types and Taxonomies Enabled', 'acf' ),
'value' => $enable_post_types ? $yes : $no,
'debug' => $enable_post_types,
);
$ui_post_types = array_filter(
$post_types,
function ( $post_type ) {
return empty( $post_type['local'] );
}
);
$fields['ui_post_types'] = array(
'label' => __( 'Registered Post Types (UI)', 'acf' ),
'value' => number_format_i18n( count( $ui_post_types ) ),
);
$json_post_types = array_filter(
$post_types,
function ( $post_type ) {
return ! empty( $post_type['local'] ) && 'json' === $post_type['local'];
}
);
$fields['json_post_types'] = array(
'label' => __( 'Registered Post Types (JSON)', 'acf' ),
'value' => number_format_i18n( count( $json_post_types ) ),
);
$ui_taxonomies = array_filter(
$taxonomies,
function ( $taxonomy ) {
return empty( $taxonomy['local'] );
}
);
$fields['ui_taxonomies'] = array(
'label' => __( 'Registered Taxonomies (UI)', 'acf' ),
'value' => number_format_i18n( count( $ui_taxonomies ) ),
);
$json_taxonomies = array_filter(
$taxonomies,
function ( $taxonomy ) {
return ! empty( $taxonomy['local'] ) && 'json' === $taxonomy['local'];
}
);
$fields['json_taxonomies'] = array(
'label' => __( 'Registered Taxonomies (JSON)', 'acf' ),
'value' => number_format_i18n( count( $json_taxonomies ) ),
);
if ( $is_pro ) {
$enable_options_pages_ui = acf_get_setting( 'enable_options_pages_ui' );
$fields['ui_options_pages_enabled'] = array(
'label' => __( 'Options Pages UI Enabled', 'acf' ),
'value' => $enable_options_pages_ui ? $yes : $no,
'debug' => $enable_options_pages_ui,
);
$options_pages = acf_get_options_pages();
$ui_options_pages = array();
if ( empty( $options_pages ) || ! is_array( $options_pages ) ) {
$options_pages = array();
}
if ( $enable_options_pages_ui ) {
$ui_options_pages = acf_get_ui_options_pages();
$ui_options_pages_in_ui = array_filter(
$ui_options_pages,
function ( $ui_options_page ) {
return empty( $ui_options_page['local'] );
}
);
$json_options_pages = array_filter(
$ui_options_pages,
function ( $ui_options_page ) {
return ! empty( $ui_options_page['local'] );
}
);
$fields['ui_options_pages'] = array(
'label' => __( 'Registered Options Pages (UI)', 'acf' ),
'value' => number_format_i18n( count( $ui_options_pages_in_ui ) ),
);
$fields['json_options_pages'] = array(
'label' => __( 'Registered Options Pages (JSON)', 'acf' ),
'value' => number_format_i18n( count( $json_options_pages ) ),
);
}
$ui_options_page_slugs = array_column( $ui_options_pages, 'menu_slug' );
$php_options_pages = array_filter(
$options_pages,
function ( $options_page ) use ( $ui_options_page_slugs ) {
return ! in_array( $options_page['menu_slug'], $ui_options_page_slugs, true );
}
);
$fields['php_options_pages'] = array(
'label' => __( 'Registered Options Pages (PHP)', 'acf' ),
'value' => number_format_i18n( count( $php_options_pages ) ),
);
}
$rest_api_format = acf_get_setting( 'rest_api_format' );
$fields['rest_api_format'] = array(
'label' => __( 'REST API Format', 'acf' ),
'value' => 'standard' === $rest_api_format ? __( 'Standard', 'acf' ) : __( 'Light', 'acf' ),
'debug' => $rest_api_format,
);
if ( $is_pro ) {
$fields['registered_acf_blocks'] = array(
'label' => __( 'Registered ACF Blocks', 'acf' ),
'value' => number_format_i18n( acf_pro_get_registered_block_count() ),
);
$blocks = acf_get_block_types();
$block_api_versions = array();
$acf_block_versions = array();
$blocks_using_post_meta = 0;
foreach ( $blocks as $block ) {
if ( ! isset( $block_api_versions[ 'v' . $block['api_version'] ] ) ) {
$block_api_versions[ 'v' . $block['api_version'] ] = 0;
}
if ( ! isset( $acf_block_versions[ 'v' . $block['acf_block_version'] ] ) ) {
$acf_block_versions[ 'v' . $block['acf_block_version'] ] = 0;
}
if ( ! empty( $block['use_post_meta'] ) ) {
++$blocks_using_post_meta;
}
++$block_api_versions[ 'v' . $block['api_version'] ];
++$acf_block_versions[ 'v' . $block['acf_block_version'] ];
}
$fields['blocks_per_api_version'] = array(
'label' => __( 'Blocks Per API Version', 'acf' ),
'value' => $block_api_versions,
);
$fields['blocks_per_acf_block_version'] = array(
'label' => __( 'Blocks Per ACF Block Version', 'acf' ),
'value' => $acf_block_versions,
);
$fields['blocks_using_post_meta'] = array(
'label' => __( 'Blocks Using Post Meta', 'acf' ),
'value' => number_format_i18n( $blocks_using_post_meta ),
);
$preload_blocks = acf_get_setting( 'preload_blocks' );
$fields['preload_blocks'] = array(
'label' => __( 'Block Preloading Enabled', 'acf' ),
'value' => ! empty( $preload_blocks ) ? $yes : $no,
'debug' => $preload_blocks,
);
}
$show_admin = acf_get_setting( 'show_admin' );
$fields['admin_ui_enabled'] = array(
'label' => __( 'Admin UI Enabled', 'acf' ),
'value' => $show_admin ? $yes : $no,
'debug' => $show_admin,
);
$field_type_modal_enabled = apply_filters( 'acf/field_group/enable_field_browser', true );
$fields['field_type-modal_enabled'] = array(
'label' => __( 'Field Type Modal Enabled', 'acf' ),
'value' => ! empty( $field_type_modal_enabled ) ? $yes : $no,
'debug' => $field_type_modal_enabled,
);
$field_settings_tabs_enabled = apply_filters( 'acf/field_group/disable_field_settings_tabs', false );
$fields['field_settings_tabs_enabled'] = array(
'label' => __( 'Field Settings Tabs Enabled', 'acf' ),
'value' => empty( $field_settings_tabs_enabled ) ? $yes : $no,
'debug' => $field_settings_tabs_enabled,
);
$shortcode_enabled = acf_get_setting( 'enable_shortcode' );
$fields['shortcode_enabled'] = array(
'label' => __( 'Shortcode Enabled', 'acf' ),
'value' => ! empty( $shortcode_enabled ) ? $yes : $no,
'debug' => $shortcode_enabled,
);
$fields['registered_acf_forms'] = array(
'label' => __( 'Registered ACF Forms', 'acf' ),
'value' => number_format_i18n( count( acf_get_forms() ) ),
);
$local_json = acf_get_instance( 'ACF_Local_JSON' );
$save_paths = $local_json->get_save_paths();
$load_paths = $local_json->get_load_paths();
$fields['json_save_paths'] = array(
'label' => __( 'JSON Save Paths', 'acf' ),
'value' => number_format_i18n( count( $save_paths ) ),
'debug' => count( $save_paths ),
);
$fields['json_load_paths'] = array(
'label' => __( 'JSON Load Paths', 'acf' ),
'value' => number_format_i18n( count( $load_paths ) ),
'debug' => count( $load_paths ),
);
return $fields;
}
}
acf_new_instance( 'ACF_Site_Health' );
}

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly

View File

@ -1,4 +1,13 @@
<?php
/**
* @package ACF
* @author WP Engine
*
* © 2025 Advanced Custom Fields (ACF®). All rights reserved.
* "ACF" is a trademark of WP Engine.
* Licensed under the GNU General Public License v2 or later.
* https://www.gnu.org/licenses/gpl-2.0.html
*/
// Register deprecated filters ( $deprecated, $version, $replacement ).
acf_add_deprecated_filter( 'acf/settings/export_textdomain', '5.3.3', 'acf/settings/l10n_textdomain' );

Some files were not shown because too many files have changed in this diff Show More