Skip to content

Commit e551ff4

Browse files
committed
Deploying version 6.2.6.1
1 parent d2bbe33 commit e551ff4

File tree

6 files changed

+43
-13
lines changed

6 files changed

+43
-13
lines changed

acf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Plugin Name: Advanced Custom Fields
1010
* Plugin URI: https://www.advancedcustomfields.com
1111
* Description: Customize WordPress with powerful, professional and intuitive fields.
12-
* Version: 6.2.6
12+
* Version: 6.2.6.1
1313
* Author: WP Engine
1414
* Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields
1515
* Text Domain: acf
@@ -35,7 +35,7 @@ class ACF {
3535
*
3636
* @var string
3737
*/
38-
public $version = '6.2.6';
38+
public $version = '6.2.6.1';
3939

4040
/**
4141
* The plugin settings array.

assets/build/js/acf-input.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/build/js/acf-input.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/build/js/acf-input.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/api/api-template.php

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ function get_field( $selector, $post_id = false, $format_value = true, $escape_h
5454
if ( acf_field_type_supports( $field['type'], 'escaping_html' ) ) {
5555
$value = acf_format_value( $value, $post_id, $field, true );
5656
} else {
57-
$value = acf_esc_html( acf_format_value( $value, $post_id, $field ) );
57+
$new_value = acf_format_value( $value, $post_id, $field );
58+
if ( is_array( $new_value ) ) {
59+
$value = map_deep( $new_value, 'acf_esc_html' );
60+
} else {
61+
$value = acf_esc_html( $new_value );
62+
}
5863
}
5964
} else {
6065
// get value for field
@@ -64,7 +69,11 @@ function get_field( $selector, $post_id = false, $format_value = true, $escape_h
6469

6570
// If we've built a dummy text field, we won't format the value, but they may still request it escaped. Use `acf_esc_html`
6671
if ( $dummy_field && $escape_html ) {
67-
$value = acf_esc_html( $value );
72+
if ( is_array( $value ) ) {
73+
$value = map_deep( $value, 'acf_esc_html' );
74+
} else {
75+
$value = acf_esc_html( $value );
76+
}
6877
}
6978

7079
// return
@@ -327,7 +336,12 @@ function get_field_object( $selector, $post_id = false, $format_value = true, $l
327336
if ( acf_field_type_supports( $field['type'], 'escaping_html' ) ) {
328337
$field['value'] = acf_format_value( $field['value'], $post_id, $field, true );
329338
} else {
330-
$field['value'] = acf_esc_html( acf_format_value( $field['value'], $post_id, $field ) );
339+
$new_value = acf_format_value( $field['value'], $post_id, $field );
340+
if ( is_array( $new_value ) ) {
341+
$field['value'] = map_deep( $new_value, 'acf_esc_html' );
342+
} else {
343+
$field['value'] = acf_esc_html( $new_value );
344+
}
331345
}
332346
} else {
333347
// get value for field
@@ -536,7 +550,12 @@ function get_field_objects( $post_id = false, $format_value = true, $load_value
536550
if ( acf_field_type_supports( $field['type'], 'escaping_html' ) ) {
537551
$field['value'] = acf_format_value( $field['value'], $post_id, $field, true );
538552
} else {
539-
$field['value'] = acf_esc_html( acf_format_value( $field['value'], $post_id, $field ) );
553+
$new_value = acf_format_value( $field['value'], $post_id, $field );
554+
if ( is_array( $new_value ) ) {
555+
$field['value'] = map_deep( $new_value, 'acf_esc_html' );
556+
} else {
557+
$field['value'] = acf_esc_html( $new_value );
558+
}
540559
}
541560
} else {
542561
// get value for field
@@ -1015,7 +1034,12 @@ function get_sub_field_object( $selector, $format_value = true, $load_value = tr
10151034
if ( acf_field_type_supports( $sub_field['type'], 'escaping_html' ) ) {
10161035
$sub_field['value'] = acf_format_value( $sub_field['value'], $row['post_id'], $sub_field, true );
10171036
} else {
1018-
$sub_field['value'] = acf_esc_html( acf_format_value( $sub_field['value'], $row['post_id'], $sub_field ) );
1037+
$new_value = acf_format_value( $sub_field['value'], $row['post_id'], $sub_field );
1038+
if ( is_array( $new_value ) ) {
1039+
$sub_field['value'] = map_deep( $new_value, 'acf_esc_html' );
1040+
} else {
1041+
$sub_field['value'] = acf_esc_html( $new_value );
1042+
}
10191043
}
10201044
} else {
10211045
// get value for field

readme.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: acf, fields, custom fields, meta, repeater
44
Requires at least: 5.8
55
Tested up to: 6.4.3
66
Requires PHP: 7.0
7-
Stable tag: 6.2.6
7+
Stable tag: 6.2.6.1
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -92,12 +92,18 @@ From your WordPress dashboard
9292

9393
== Changelog ==
9494

95+
= 6.2.6.1 =
96+
*Release Date 7th February 2024*
97+
98+
* Fix - Fatal JS error no longer occurs when editing fields in the classic editor when Yoast or other plugins which load block editor components are installed
99+
* Fix - Using `$escape_html` on get functions for array returning field types no longer produces an Array to string conversion error
100+
95101
= 6.2.6 =
96102
*Release Date 6th February 2024*
97103

98104
* Enhancement - The `get_field()` and other `get_` functions now support an `escape_html` parameter which return an HTML safe field value
99105
* Enhancement - The URL field will be now escaped with `esc_url` rather than `wp_kses_post` when returning an HTML safe value
100-
* Fix - ACF fields will now correctly save into the WordPress created revision resolving issues with previews of drafts on WordPress 6.4 or newer.
106+
* Fix - ACF fields will now correctly save into the WordPress created revision resolving issues with previews of drafts on WordPress 6.4 or newer
101107
* Fix - Multisite subsites will now correctly be activated by the main site where the ACF PRO license allows, hiding the updates page on those subsites
102108
* Fix - Field types in which the `required` property would have no effect (such as the tab, or accordion) will no longer show the option
103109
* Fix - Duplicating a field group now maintains the current page of field groups being displayed
@@ -106,7 +112,7 @@ From your WordPress dashboard
106112
* Fix - The word `link` is now prohibited from being used as a CPT name to avoid a WordPress core conflict
107113
* Fix - Flexible content layouts can no longer be duplicated over their maximum count limit
108114
* Fix - All ACF notifications shown outside of ACF’s admin screens are now prefixed with the plugin name
109-
* Fix - ACF no longer checks if a polyfill is needed for <PHP7 and the polyfill has been removed.
115+
* Fix - ACF no longer checks if a polyfill is needed for <PHP7 and the polyfill has been removed
110116

111117
= 6.2.5 =
112118
*Release Date 16th January 2024*

0 commit comments

Comments
 (0)