Skip to content

Commit

Permalink
Updates to 6.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ACF committed Jan 17, 2024
1 parent 830e8b9 commit f856221
Show file tree
Hide file tree
Showing 119 changed files with 32,569 additions and 26,457 deletions.
4 changes: 2 additions & 2 deletions acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Advanced Custom Fields PRO
* Plugin URI: https://www.advancedcustomfields.com
* Description: Customize WordPress with powerful, professional and intuitive fields.
* Version: 6.2.4
* Version: 6.2.5
* 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
Expand All @@ -36,7 +36,7 @@ class ACF {
*
* @var string
*/
public $version = '6.2.4';
public $version = '6.2.5';

/**
* The plugin settings array.
Expand Down
39 changes: 39 additions & 0 deletions assets/build/js/acf-escaped-html-notice.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/build/js/acf-escaped-html-notice.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/build/js/acf-escaped-html-notice.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 12 additions & 13 deletions assets/build/js/acf-field-group.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/build/js/acf-field-group.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/build/js/acf-field-group.min.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions assets/build/js/acf-input.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/build/js/acf-input.js.map

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions assets/build/js/pro/acf-pro-blocks.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/build/js/pro/acf-pro-blocks.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/build/js/pro/acf-pro-blocks.min.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions assets/build/js/pro/acf-pro-input.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/build/js/pro/acf-pro-input.js.map

Large diffs are not rendered by default.

59 changes: 31 additions & 28 deletions includes/acf-value-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @since 5.6.5
*
* @param string $field_name The name of the field. eg 'sub_heading'.
* @param mixed $post_id The post_id of which the value is saved against.
* @param mixed $post_id The post_id of which the value is saved against.
* @return string The field key.
*/
function acf_get_reference( $field_name, $post_id ) {
Expand Down Expand Up @@ -45,8 +45,8 @@ function acf_get_reference( $field_name, $post_id ) {
* @date 28/09/13
* @since 5.0.0
*
* @param int|string $post_id The post id.
* @param array $field The field array.
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @return mixed
*/
function acf_get_value( $post_id, $field ) {
Expand Down Expand Up @@ -134,45 +134,47 @@ function acf_get_value( $post_id, $field ) {
*
* Returns a formatted version of the provided value.
*
* @date 28/09/13
* @since 5.0.0
*
* @param mixed $value The field value.
* @param (int|string) $post_id The post id.
* @param array $field The field array.
* @return mixed.
* @param mixed $value The field value.
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @param boolean $escape_html Ask the field for a HTML safe version of it's output.
* @return mixed
*/
function acf_format_value( $value, $post_id, $field ) {
function acf_format_value( $value, $post_id, $field, $escape_html = false ) {

// Allow filter to short-circuit load_value logic.
$check = apply_filters( 'acf/pre_format_value', null, $value, $post_id, $field );
$check = apply_filters( 'acf/pre_format_value', null, $value, $post_id, $field, $escape_html );
if ( $check !== null ) {
return $check;
}

// Get field name.
$field_name = $field['name'];
$cache_name = $escape_html ? "$post_id:$field_name:escaped" : "$post_id:$field_name:formatted";

// Check store.
$store = acf_get_store( 'values' );
if ( $store->has( "$post_id:$field_name:formatted" ) ) {
return $store->get( "$post_id:$field_name:formatted" );
if ( $store->has( $cache_name ) ) {
return $store->get( $cache_name );
}

/**
* Filters the $value for use in a template function.
*
* @date 28/09/13
* @since 5.0.0
*
* @param mixed $value The value to preview.
* @param string $post_id The post ID for this value.
* @param array $field The field array.
* @param mixed $value The value to preview.
* @param string $post_id The post ID for this value.
* @param array $field The field array.
* @param boolean $escape_html Ask the field for a HTML safe version of it's output.
* This parameter will not guarantee the result is escaped, only if the field type supports it.
*/
$value = apply_filters( 'acf/format_value', $value, $post_id, $field );
$value = apply_filters( 'acf/format_value', $value, $post_id, $field, $escape_html );

// Update store.
$store->set( "$post_id:$field_name:formatted", $value );
$store->set( $cache_name, $value );

// Return value.
return $value;
Expand All @@ -189,10 +191,10 @@ function acf_format_value( $value, $post_id, $field ) {
* @date 28/09/13
* @since 5.0.0
*
* @param mixed $value The new value.
* @param mixed $value The new value.
* @param (int|string) $post_id The post id.
* @param array $field The field array.
* @return bool.
* @param array $field The field array.
* @return boolean
*/
function acf_update_value( $value, $post_id, $field ) {

Expand Down Expand Up @@ -271,7 +273,7 @@ function acf_update_values( $values, $post_id ) {
* @date 22/1/19
* @since 5.7.10
*
* @param (int|string) $post_id The post id.
* @param (int|string) $post_id The post id.
* @param string $field_name The field name.
* @return void
*/
Expand All @@ -280,7 +282,8 @@ function acf_flush_value_cache( $post_id = 0, $field_name = '' ) {
// Delete stored data.
acf_get_store( 'values' )
->remove( "$post_id:$field_name" )
->remove( "$post_id:$field_name:formatted" );
->remove( "$post_id:$field_name:formatted" )
->remove( "$post_id:$field_name:escaped" );
}

/**
Expand All @@ -292,8 +295,8 @@ function acf_flush_value_cache( $post_id = 0, $field_name = '' ) {
* @since 5.0.0
*
* @param (int|string) $post_id The post id.
* @param array $field The field array.
* @return bool.
* @param array $field The field array.
* @return boolean
*/
function acf_delete_value( $post_id, $field ) {

Expand Down Expand Up @@ -333,10 +336,10 @@ function acf_delete_value( $post_id, $field ) {
* @date 28/09/13
* @since 5.0.0
*
* @param mixed $value The new value.
* @param mixed $value The new value.
* @param (int|string) $post_id The post id.
* @param array $field The field array.
* @return bool.
* @param array $field The field array.
* @return boolean
*/
function acf_preview_value( $value, $post_id, $field ) {

Expand Down
Loading

0 comments on commit f856221

Please sign in to comment.