Compare commits
11 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
edf1bac99d | |
|
|
d6a46976ef | |
|
|
fca2af463e | |
|
|
28183c4288 | |
|
|
b52f0cd3ba | |
|
|
edcc0c871f | |
|
|
ed376e7d24 | |
|
|
7cb32137bc | |
|
|
f9339e6c62 | |
|
|
159a580148 | |
|
|
0e92288e89 |
59
acf.php
|
|
@ -9,14 +9,24 @@
|
|||
* Plugin Name: Advanced Custom Fields PRO
|
||||
* Plugin URI: https://www.advancedcustomfields.com
|
||||
* Description: Customize WordPress with powerful, professional and intuitive fields.
|
||||
* Version: 6.4.1
|
||||
* 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: 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.4.1';
|
||||
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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
@ -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))})})();
|
||||
|
|
@ -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)})()})();
|
||||
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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' ) ) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 === '' ) {
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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' ) ) {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
|
|
@ -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 . ' —</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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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' ),
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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' ) ) :
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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' ) ) :
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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' ) ); ?>" />
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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' ) ); ?>" />
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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' ) );
|
||||
|
|
|
|||
|
|
@ -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 . ' —</strong>';
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
||||
|
|
|
|||
|
|
@ -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', '' ); ?>
|
||||
|
|
|
|||
|
|
@ -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; ?>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
||||
|
|
|
|||
|
|
@ -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'] ) ) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -1,16 +1,26 @@
|
|||
<?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_fields' ) ) :
|
||||
#[AllowDynamicProperties]
|
||||
class acf_fields {
|
||||
|
||||
/** @var array Contains an array of field type instances */
|
||||
var $types = array();
|
||||
|
||||
/**
|
||||
* Contains an array of field type instances.
|
||||
* @var array
|
||||
*/
|
||||
public $types = array();
|
||||
|
||||
/**
|
||||
* This function will setup the class functionality
|
||||
|
|
|
|||
|
|
@ -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 ( ! class_exists( 'acf_field__accordion' ) ) :
|
||||
|
||||
|
|
|
|||