acf pro update
Showing
156 changed files
with
39 additions
and
27 deletions
| ... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
| 9 | * Plugin Name: Advanced Custom Fields PRO | 9 | * Plugin Name: Advanced Custom Fields PRO |
| 10 | * Plugin URI: https://www.advancedcustomfields.com | 10 | * Plugin URI: https://www.advancedcustomfields.com |
| 11 | * Description: Customize WordPress with powerful, professional and intuitive fields. | 11 | * Description: Customize WordPress with powerful, professional and intuitive fields. |
| 12 | * Version: 6.2.8 | 12 | * Version: 6.2.9 |
| 13 | * Author: WP Engine | 13 | * Author: WP Engine |
| 14 | * Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields | 14 | * Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields |
| 15 | * Update URI: https://www.advancedcustomfields.com/pro | 15 | * Update URI: https://www.advancedcustomfields.com/pro |
| ... | @@ -36,7 +36,7 @@ if ( ! class_exists( 'ACF' ) ) { | ... | @@ -36,7 +36,7 @@ if ( ! class_exists( 'ACF' ) ) { |
| 36 | * | 36 | * |
| 37 | * @var string | 37 | * @var string |
| 38 | */ | 38 | */ |
| 39 | public $version = '6.2.8'; | 39 | public $version = '6.2.9'; |
| 40 | 40 | ||
| 41 | /** | 41 | /** |
| 42 | * The plugin settings array. | 42 | * The plugin settings array. | ... | ... |
| ... | @@ -1425,7 +1425,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = | ... | @@ -1425,7 +1425,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = |
| 1425 | } | 1425 | } |
| 1426 | }, | 1426 | }, |
| 1427 | onChangeName: function (e, $el) { | 1427 | onChangeName: function (e, $el) { |
| 1428 | const sanitizedName = acf.strSanitize($el.val()); | 1428 | const sanitizedName = acf.strSanitize($el.val(), false); |
| 1429 | $el.val(sanitizedName); | 1429 | $el.val(sanitizedName); |
| 1430 | this.set('name', sanitizedName); | 1430 | this.set('name', sanitizedName); |
| 1431 | if (sanitizedName.startsWith('field_')) { | 1431 | if (sanitizedName.startsWith('field_')) { | ... | ... |
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
| ... | @@ -8041,6 +8041,7 @@ | ... | @@ -8041,6 +8041,7 @@ |
| 8041 | ajaxResults: function (json) { | 8041 | ajaxResults: function (json) { |
| 8042 | return json; | 8042 | return json; |
| 8043 | }, | 8043 | }, |
| 8044 | escapeMarkup: false, | ||
| 8044 | templateSelection: false, | 8045 | templateSelection: false, |
| 8045 | templateResult: false, | 8046 | templateResult: false, |
| 8046 | dropdownCssClass: '', | 8047 | dropdownCssClass: '', |
| ... | @@ -8301,20 +8302,12 @@ | ... | @@ -8301,20 +8302,12 @@ |
| 8301 | allowClear: this.get('allowNull'), | 8302 | allowClear: this.get('allowNull'), |
| 8302 | placeholder: this.get('placeholder'), | 8303 | placeholder: this.get('placeholder'), |
| 8303 | multiple: this.get('multiple'), | 8304 | multiple: this.get('multiple'), |
| 8305 | escapeMarkup: this.get('escapeMarkup'), | ||
| 8304 | templateSelection: this.get('templateSelection'), | 8306 | templateSelection: this.get('templateSelection'), |
| 8305 | templateResult: this.get('templateResult'), | 8307 | templateResult: this.get('templateResult'), |
| 8306 | dropdownCssClass: this.get('dropdownCssClass'), | 8308 | dropdownCssClass: this.get('dropdownCssClass'), |
| 8307 | suppressFilters: this.get('suppressFilters'), | 8309 | suppressFilters: this.get('suppressFilters'), |
| 8308 | data: [], | 8310 | data: [] |
| 8309 | escapeMarkup: function (markup) { | ||
| 8310 | if (typeof markup !== 'string') { | ||
| 8311 | return markup; | ||
| 8312 | } | ||
| 8313 | if (this.suppressFilters) { | ||
| 8314 | return acf.strEscape(markup); | ||
| 8315 | } | ||
| 8316 | return acf.applyFilters('select2_escape_markup', acf.strEscape(markup), markup, $select, this.data, field || false, this); | ||
| 8317 | } | ||
| 8318 | }; | 8311 | }; |
| 8319 | 8312 | ||
| 8320 | // Clear empty templateSelections, templateResults, or dropdownCssClass. | 8313 | // Clear empty templateSelections, templateResults, or dropdownCssClass. |
| ... | @@ -8343,6 +8336,19 @@ | ... | @@ -8343,6 +8336,19 @@ |
| 8343 | delete options.templateResult; | 8336 | delete options.templateResult; |
| 8344 | } | 8337 | } |
| 8345 | 8338 | ||
| 8339 | // Use a default, filterable escapeMarkup if not provided. | ||
| 8340 | if (!options.escapeMarkup) { | ||
| 8341 | options.escapeMarkup = function (markup) { | ||
| 8342 | if (typeof markup !== 'string') { | ||
| 8343 | return markup; | ||
| 8344 | } | ||
| 8345 | if (this.suppressFilters) { | ||
| 8346 | return acf.strEscape(markup); | ||
| 8347 | } | ||
| 8348 | return acf.applyFilters('select2_escape_markup', acf.strEscape(markup), markup, $select, this.data, field || false, this); | ||
| 8349 | }; | ||
| 8350 | } | ||
| 8351 | |||
| 8346 | // multiple | 8352 | // multiple |
| 8347 | if (options.multiple) { | 8353 | if (options.multiple) { |
| 8348 | // reorder options | 8354 | // reorder options | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -2093,7 +2093,7 @@ | ... | @@ -2093,7 +2093,7 @@ |
| 2093 | acf.strSlugify = function (str) { | 2093 | acf.strSlugify = function (str) { |
| 2094 | return acf.strReplace('_', '-', str.toLowerCase()); | 2094 | return acf.strReplace('_', '-', str.toLowerCase()); |
| 2095 | }; | 2095 | }; |
| 2096 | acf.strSanitize = function (str) { | 2096 | acf.strSanitize = function (str, toLowerCase = true) { |
| 2097 | // chars (https://jsperf.com/replace-foreign-characters) | 2097 | // chars (https://jsperf.com/replace-foreign-characters) |
| 2098 | var map = { | 2098 | var map = { |
| 2099 | À: 'A', | 2099 | À: 'A', |
| ... | @@ -2338,7 +2338,9 @@ | ... | @@ -2338,7 +2338,9 @@ |
| 2338 | str = str.replace(nonWord, mapping); | 2338 | str = str.replace(nonWord, mapping); |
| 2339 | 2339 | ||
| 2340 | // lowercase | 2340 | // lowercase |
| 2341 | str = str.toLowerCase(); | 2341 | if (toLowerCase) { |
| 2342 | str = str.toLowerCase(); | ||
| 2343 | } | ||
| 2342 | 2344 | ||
| 2343 | // return | 2345 | // return |
| 2344 | return str; | 2346 | return str; | ... | ... |
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
| ... | @@ -353,11 +353,12 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) : | ... | @@ -353,11 +353,12 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) : |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | $_POST['acf_field_group']['ID'] = $post_id; | 355 | $_POST['acf_field_group']['ID'] = $post_id; |
| 356 | // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized when saved. | 356 | // phpcs:disable WordPress.Security.ValidatedSanitizedInput |
| 357 | $_POST['acf_field_group']['title'] = acf_maybe_get_POST( 'post_title', '' ); | 357 | $_POST['acf_field_group']['title'] = isset( $_POST['post_title'] ) ? $_POST['post_title'] : ''; // Post title is stored unsafe like WordPress, escaped on output. |
| 358 | 358 | ||
| 359 | // save field group. | 359 | // save field group. |
| 360 | acf_update_field_group( $_POST['acf_field_group'] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput | 360 | acf_update_field_group( $_POST['acf_field_group'] ); |
| 361 | // phpcs:enable WordPress.Security.ValidatedSanitizedInput | ||
| 361 | // phpcs:enable WordPress.Security.NonceVerification.Missing | 362 | // phpcs:enable WordPress.Security.NonceVerification.Missing |
| 362 | 363 | ||
| 363 | return $post_id; | 364 | return $post_id; | ... | ... |
| ... | @@ -191,10 +191,13 @@ if ( ! class_exists( 'ACF_Form_Post' ) ) : | ... | @@ -191,10 +191,13 @@ if ( ! class_exists( 'ACF_Form_Post' ) ) : |
| 191 | // render 'acf_after_title' metaboxes | 191 | // render 'acf_after_title' metaboxes |
| 192 | do_meta_boxes( get_current_screen(), 'acf_after_title', $post ); | 192 | do_meta_boxes( get_current_screen(), 'acf_after_title', $post ); |
| 193 | 193 | ||
| 194 | if ( ! empty( $this->style ) ) { | 194 | $style = ''; |
| 195 | // render dynamic field group style, using wp_strip_all_tags as this is filterable, but should only contain valid styles and no html. | 195 | if ( is_string( $this->style ) ) { |
| 196 | echo '<style type="text/css" id="acf-style">' . wp_strip_all_tags( $this->style ) . '</style>'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CSS only, escaped by wp_strip_all_tags. | 196 | $style = $this->style; |
| 197 | } | 197 | } |
| 198 | |||
| 199 | // Render dynamic field group style, using wp_strip_all_tags as this is filterable, but should only contain valid styles and no html. | ||
| 200 | echo '<style type="text/css" id="acf-style">' . wp_strip_all_tags( $style ) . '</style>'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CSS only, escaped by wp_strip_all_tags. | ||
| 198 | } | 201 | } |
| 199 | 202 | ||
| 200 | /** | 203 | /** | ... | ... |
This diff is collapsed.
Click to expand it.
No preview for this file type
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | # This file is distributed under the same license as Advanced Custom Fields. | 12 | # This file is distributed under the same license as Advanced Custom Fields. |
| 13 | msgid "" | 13 | msgid "" |
| 14 | msgstr "" | 14 | msgstr "" |
| 15 | "PO-Revision-Date: 2024-03-29T21:10:52+00:00\n" | 15 | "PO-Revision-Date: 2024-04-08T08:54:42+00:00\n" |
| 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" | 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" |
| 17 | "Language: ar\n" | 17 | "Language: ar\n" |
| 18 | "MIME-Version: 1.0\n" | 18 | "MIME-Version: 1.0\n" | ... | ... |
This diff is collapsed.
Click to expand it.
No preview for this file type
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | # This file is distributed under the same license as Advanced Custom Fields. | 12 | # This file is distributed under the same license as Advanced Custom Fields. |
| 13 | msgid "" | 13 | msgid "" |
| 14 | msgstr "" | 14 | msgstr "" |
| 15 | "PO-Revision-Date: 2024-03-29T21:10:52+00:00\n" | 15 | "PO-Revision-Date: 2024-04-08T08:54:42+00:00\n" |
| 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" | 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" |
| 17 | "Language: bg_BG\n" | 17 | "Language: bg_BG\n" |
| 18 | "MIME-Version: 1.0\n" | 18 | "MIME-Version: 1.0\n" | ... | ... |
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | # This file is distributed under the same license as Advanced Custom Fields. | 12 | # This file is distributed under the same license as Advanced Custom Fields. |
| 13 | msgid "" | 13 | msgid "" |
| 14 | msgstr "" | 14 | msgstr "" |
| 15 | "PO-Revision-Date: 2024-03-29T21:10:52+00:00\n" | 15 | "PO-Revision-Date: 2024-04-08T08:54:42+00:00\n" |
| 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" | 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" |
| 17 | "Language: de_CH\n" | 17 | "Language: de_CH\n" |
| 18 | "MIME-Version: 1.0\n" | 18 | "MIME-Version: 1.0\n" | ... | ... |
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | # This file is distributed under the same license as Advanced Custom Fields. | 12 | # This file is distributed under the same license as Advanced Custom Fields. |
| 13 | msgid "" | 13 | msgid "" |
| 14 | msgstr "" | 14 | msgstr "" |
| 15 | "PO-Revision-Date: 2024-03-29T21:10:52+00:00\n" | 15 | "PO-Revision-Date: 2024-04-08T08:54:42+00:00\n" |
| 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" | 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" |
| 17 | "Language: he_IL\n" | 17 | "Language: he_IL\n" |
| 18 | "MIME-Version: 1.0\n" | 18 | "MIME-Version: 1.0\n" | ... | ... |
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | # This file is distributed under the same license as Advanced Custom Fields. | 12 | # This file is distributed under the same license as Advanced Custom Fields. |
| 13 | msgid "" | 13 | msgid "" |
| 14 | msgstr "" | 14 | msgstr "" |
| 15 | "PO-Revision-Date: 2024-03-29T21:10:52+00:00\n" | 15 | "PO-Revision-Date: 2024-04-08T08:54:42+00:00\n" |
| 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" | 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" |
| 17 | "Language: hu_HU\n" | 17 | "Language: hu_HU\n" |
| 18 | "MIME-Version: 1.0\n" | 18 | "MIME-Version: 1.0\n" | ... | ... |
This diff is collapsed.
Click to expand it.
No preview for this file type
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | # This file is distributed under the same license as Advanced Custom Fields. | 12 | # This file is distributed under the same license as Advanced Custom Fields. |
| 13 | msgid "" | 13 | msgid "" |
| 14 | msgstr "" | 14 | msgstr "" |
| 15 | "PO-Revision-Date: 2024-03-29T21:10:52+00:00\n" | 15 | "PO-Revision-Date: 2024-04-08T08:54:42+00:00\n" |
| 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" | 16 | "Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n" |
| 17 | "Language: id_ID\n" | 17 | "Language: id_ID\n" |
| 18 | "MIME-Version: 1.0\n" | 18 | "MIME-Version: 1.0\n" | ... | ... |
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment