Updates to 6.3.12
This commit is contained in:
parent
71ccf95660
commit
9fa1872316
58
acf.php
58
acf.php
|
|
@ -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.3.11
|
||||
* Version: 6.3.12
|
||||
* Author: WP Engine
|
||||
* Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields
|
||||
* Update URI: false
|
||||
|
|
@ -36,7 +36,7 @@ if ( ! class_exists( 'ACF' ) ) {
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version = '6.3.11';
|
||||
public $version = '6.3.12';
|
||||
|
||||
/**
|
||||
* The plugin settings array.
|
||||
|
|
@ -228,10 +228,10 @@ if ( ! class_exists( 'ACF' ) ) {
|
|||
// Include legacy.
|
||||
acf_include( 'includes/legacy/legacy-locations.php' );
|
||||
|
||||
// Include updater.
|
||||
acf_include( 'includes/Updater/Updater.php' );
|
||||
// Include updater if included with this build.
|
||||
acf_include( 'includes/Updater/init.php' );
|
||||
|
||||
// Include PRO.
|
||||
// Include PRO if included with this build.
|
||||
acf_include( 'pro/acf-pro.php' );
|
||||
|
||||
if ( is_admin() && function_exists( 'acf_is_pro' ) && ! acf_is_pro() ) {
|
||||
|
|
@ -401,18 +401,6 @@ if ( ! class_exists( 'ACF' ) ) {
|
|||
new ACF\Blocks\Bindings();
|
||||
}
|
||||
|
||||
// If we're ACF free, register the updater.
|
||||
if ( function_exists( 'acf_is_pro' ) && ! acf_is_pro() ) {
|
||||
acf_register_plugin_update(
|
||||
array(
|
||||
'id' => 'acf',
|
||||
'slug' => acf_get_setting( 'slug' ),
|
||||
'basename' => acf_get_setting( 'basename' ),
|
||||
'version' => acf_get_setting( 'version' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires after ACF is completely "initialized".
|
||||
*
|
||||
|
|
@ -799,42 +787,6 @@ if ( ! class_exists( 'ACF' ) ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'ACF_Updates' ) ) {
|
||||
/**
|
||||
* The main function responsible for returning the acf_updates singleton.
|
||||
* Use this function like you would a global variable, except without needing to declare the global.
|
||||
*
|
||||
* Example: <?php $acf_updates = acf_updates(); ?>
|
||||
*
|
||||
* @since 5.5.12
|
||||
*
|
||||
* @return ACF\Updater The singleton instance of Updater.
|
||||
*/
|
||||
function acf_updates() {
|
||||
global $acf_updates;
|
||||
if ( ! isset( $acf_updates ) ) {
|
||||
$acf_updates = new ACF\Updater();
|
||||
}
|
||||
return $acf_updates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of acf_updates()->add_plugin().
|
||||
*
|
||||
* @since 5.5.10
|
||||
*
|
||||
* @param array $plugin Plugin data array.
|
||||
*/
|
||||
function acf_register_plugin_update( $plugin ) {
|
||||
acf_updates()->add_plugin( $plugin );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a dummy ACF_Updates class for back compat.
|
||||
*/
|
||||
class ACF_Updates {} //phpcs:ignore -- Back compat.
|
||||
}
|
||||
|
||||
/**
|
||||
* An ACF specific getter to replace `home_url` in our license checks to ensure we can avoid third party filters.
|
||||
*
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
/**
|
||||
* Initializes ACF updater logic and logic specific to ACF direct downloads.
|
||||
*
|
||||
* @package ACF
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include updater.
|
||||
acf_include( 'includes/Updater/Updater.php' );
|
||||
|
||||
if ( ! class_exists( 'ACF_Updates' ) ) {
|
||||
/**
|
||||
* The main function responsible for returning the acf_updates singleton.
|
||||
* Use this function like you would a global variable, except without needing to declare the global.
|
||||
*
|
||||
* Example: <?php $acf_updates = acf_updates(); ?>
|
||||
*
|
||||
* @since 5.5.12
|
||||
*
|
||||
* @return ACF\Updater The singleton instance of Updater.
|
||||
*/
|
||||
function acf_updates() {
|
||||
global $acf_updates;
|
||||
if ( ! isset( $acf_updates ) ) {
|
||||
$acf_updates = new ACF\Updater();
|
||||
}
|
||||
return $acf_updates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of acf_updates()->add_plugin().
|
||||
*
|
||||
* @since 5.5.10
|
||||
*
|
||||
* @param array $plugin Plugin data array.
|
||||
*/
|
||||
function acf_register_plugin_update( $plugin ) {
|
||||
acf_updates()->add_plugin( $plugin );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a dummy ACF_Updates class for back compat.
|
||||
*/
|
||||
class ACF_Updates {} //phpcs:ignore -- Back compat.
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers updates for the free version of ACF hosted on connect.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function acf_register_free_updates() {
|
||||
// If we're ACF free, register the updater.
|
||||
if ( function_exists( 'acf_is_pro' ) && ! acf_is_pro() ) {
|
||||
acf_register_plugin_update(
|
||||
array(
|
||||
'id' => 'acf',
|
||||
'slug' => acf_get_setting( 'slug' ),
|
||||
'basename' => acf_get_setting( 'basename' ),
|
||||
'version' => acf_get_setting( 'version' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
add_action( 'acf/init', 'acf_register_free_updates' );
|
||||
|
||||
/**
|
||||
* Filters the "Update Source" param in the ACF site health.
|
||||
*
|
||||
* @since 6.3.11.1
|
||||
*
|
||||
* @param string $update_source The original update source.
|
||||
* @return string
|
||||
*/
|
||||
function acf_direct_update_source( $update_source ) {
|
||||
return __( 'ACF Direct', 'acf' );
|
||||
}
|
||||
add_filter( 'acf/site_health/update_source', 'acf_direct_update_source' );
|
||||
|
||||
/**
|
||||
* Unsets ACF from reporting back to the WP.org API.
|
||||
*
|
||||
* @param array $args An array of HTTP request arguments.
|
||||
* @param string $url The request URL.
|
||||
* @return array|mixed
|
||||
*/
|
||||
function acf_unset_plugin_from_org_reporting( $args, $url ) {
|
||||
// Bail if not a plugins request.
|
||||
if ( empty( $args['body']['plugins'] ) ) {
|
||||
return $args;
|
||||
}
|
||||
|
||||
// Bail if not a request to the wp.org API.
|
||||
$parsed_url = wp_parse_url( $url );
|
||||
if ( empty( $parsed_url['host'] ) || 'api.wordpress.org' !== $parsed_url['host'] ) {
|
||||
return $args;
|
||||
}
|
||||
|
||||
$plugins = json_decode( $args['body']['plugins'], true );
|
||||
if ( empty( $plugins ) ) {
|
||||
return $args;
|
||||
}
|
||||
|
||||
// Remove ACF from reporting.
|
||||
if ( ! empty( $plugins['plugins'][ ACF_BASENAME ] ) ) {
|
||||
unset( $plugins['plugins'][ ACF_BASENAME ] );
|
||||
}
|
||||
|
||||
if ( ! empty( $plugins['active'] ) && is_array( $plugins['active'] ) ) {
|
||||
$is_active = array_search( ACF_BASENAME, $plugins['active'], true );
|
||||
if ( $is_active !== false ) {
|
||||
unset( $plugins['active'][ $is_active ] );
|
||||
$plugins['active'] = array_values( $plugins['active'] );
|
||||
}
|
||||
}
|
||||
|
||||
// Add the plugins list (minus ACF) back to $args.
|
||||
$args['body']['plugins'] = wp_json_encode( $plugins );
|
||||
|
||||
return $args;
|
||||
}
|
||||
add_filter( 'http_request_args', 'acf_unset_plugin_from_org_reporting', 10, 2 );
|
||||
|
|
@ -318,9 +318,18 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
|
|||
$wp_engine_link = acf_add_url_utm_tags( 'https://wpengine.com/', 'bx_prod_referral', acf_is_pro() ? 'acf_pro_plugin_footer_text' : 'acf_free_plugin_footer_text', false, 'acf_plugin', 'referral' );
|
||||
$acf_link = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/', 'footer', 'footer' );
|
||||
|
||||
if ( acf_is_pro() ) {
|
||||
return sprintf(
|
||||
/* translators: This text is prepended by a link to ACF's website, and appended by a link to WP Engine's website. */
|
||||
'<a href="%1$s" target="_blank">ACF®</a> and <a href="%1$s" target="_blank">ACF® PRO</a> ' . __( 'are developed and maintained by', 'acf' ) . ' <a href="%2$s" target="_blank">WP Engine</a>.',
|
||||
$acf_link,
|
||||
$wp_engine_link
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
/* translators: This text is prepended by a link to ACF's website, and appended by a link to WP Engine's website. */
|
||||
'<a href="%1$s" target="_blank">' . ( acf_is_pro() ? 'ACF PRO' : 'ACF' ) . '</a> ' . __( 'is developed and maintained by', 'acf' ) . ' <a href="%2$s" target="_blank">WP Engine</a>.',
|
||||
'<a href="%1$s" target="_blank">ACF®</a> ' . __( 'is developed and maintained by', 'acf' ) . ' <a href="%2$s" target="_blank">WP Engine</a>.',
|
||||
$acf_link,
|
||||
$wp_engine_link
|
||||
);
|
||||
|
|
|
|||
|
|
@ -476,6 +476,7 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
|
|||
'editor' => acf_is_block_editor() ? 'block' : 'classic',
|
||||
'is_pro' => acf_is_pro(),
|
||||
'debug' => acf_is_beta() || ( defined( 'ACF_DEVELOPMENT_MODE' ) && ACF_DEVELOPMENT_MODE ),
|
||||
'StrictMode' => defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && version_compare( $wp_version, '6.6', '>=' ),
|
||||
);
|
||||
|
||||
acf_localize_data( $data_to_localize );
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ if ( ! class_exists( 'ACF_Site_Health' ) ) {
|
|||
|
||||
$fields['update_source'] = array(
|
||||
'label' => __( 'Update Source', 'acf' ),
|
||||
'value' => __( 'ACF Direct', 'acf' ),
|
||||
'value' => apply_filters( 'acf/site_health/update_source', __( 'wordpress.org', 'acf' ) ),
|
||||
);
|
||||
|
||||
if ( $is_pro ) {
|
||||
|
|
|
|||
|
|
@ -537,47 +537,3 @@ function acf_upgrade_550_taxonomy( $taxonomy ) {
|
|||
// action for 3rd party
|
||||
do_action( 'acf/upgrade_550_taxonomy', $taxonomy );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets ACF from reporting back to the WP.org API.
|
||||
*
|
||||
* @param array $args An array of HTTP request arguments.
|
||||
* @param string $url The request URL.
|
||||
* @return array|mixed
|
||||
*/
|
||||
function acf_unset_plugin_from_org_reporting( $args, $url ) {
|
||||
// Bail if not a plugins request.
|
||||
if ( empty( $args['body']['plugins'] ) ) {
|
||||
return $args;
|
||||
}
|
||||
|
||||
// Bail if not a request to the wp.org API.
|
||||
$parsed_url = wp_parse_url( $url );
|
||||
if ( empty( $parsed_url['host'] ) || 'api.wordpress.org' !== $parsed_url['host'] ) {
|
||||
return $args;
|
||||
}
|
||||
|
||||
$plugins = json_decode( $args['body']['plugins'], true );
|
||||
if ( empty( $plugins ) ) {
|
||||
return $args;
|
||||
}
|
||||
|
||||
// Remove ACF from reporting.
|
||||
if ( ! empty( $plugins['plugins'][ ACF_BASENAME ] ) ) {
|
||||
unset( $plugins['plugins'][ ACF_BASENAME ] );
|
||||
}
|
||||
|
||||
if ( ! empty( $plugins['active'] ) && is_array( $plugins['active'] ) ) {
|
||||
$is_active = array_search( ACF_BASENAME, $plugins['active'], true );
|
||||
if ( $is_active !== false ) {
|
||||
unset( $plugins['active'][ $is_active ] );
|
||||
$plugins['active'] = array_values( $plugins['active'] );
|
||||
}
|
||||
}
|
||||
|
||||
// Add the plugins list (minus ACF) back to $args.
|
||||
$args['body']['plugins'] = wp_json_encode( $plugins );
|
||||
|
||||
return $args;
|
||||
}
|
||||
add_filter( 'http_request_args', 'acf_unset_plugin_from_org_reporting', 10, 2 );
|
||||
|
|
|
|||
|
|
@ -127,13 +127,23 @@ if ( ! class_exists( 'acf_validation' ) ) :
|
|||
*/
|
||||
public function ajax_validate_save_post() {
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
if ( empty( $_REQUEST['nonce'] ) ) {
|
||||
$nonce_error = __( 'ACF was unable to perform validation because no nonce was received by the server.', 'acf' );
|
||||
} else {
|
||||
$nonce_error = __( 'ACF was unable to perform validation because the provided nonce failed verification.', 'acf' );
|
||||
}
|
||||
|
||||
wp_send_json_success(
|
||||
array(
|
||||
'valid' => 0,
|
||||
'errors' => array(
|
||||
array(
|
||||
'input' => false,
|
||||
'message' => __( 'ACF was unable to perform validation due to an invalid security nonce being provided.', 'acf' ),
|
||||
'message' => $nonce_error,
|
||||
'action' => array(
|
||||
'label' => __( 'Learn more', 'acf' ),
|
||||
'url' => acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/validation-nonce-errors/', 'docs', 'validation-nonce' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
BIN
lang/acf-ar.mo
BIN
lang/acf-ar.mo
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: ar\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: bg_BG\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
BIN
lang/acf-ca.mo
BIN
lang/acf-ca.mo
Binary file not shown.
702
lang/acf-ca.po
702
lang/acf-ca.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: de_CH\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
lang/acf-el.mo
BIN
lang/acf-el.mo
Binary file not shown.
696
lang/acf-el.po
696
lang/acf-el.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
lang/acf-fi.mo
BIN
lang/acf-fi.mo
Binary file not shown.
692
lang/acf-fi.po
692
lang/acf-fi.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: fr_CA\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
lang/acf-gu.mo
BIN
lang/acf-gu.mo
Binary file not shown.
778
lang/acf-gu.po
778
lang/acf-gu.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: he_IL\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
BIN
lang/acf-hr.mo
BIN
lang/acf-hr.mo
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: hr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: hu_HU\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -12,7 +12,7 @@
|
|||
# This file is distributed under the same license as Advanced Custom Fields.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2024-10-02T12:08:46+00:00\n"
|
||||
"PO-Revision-Date: 2025-01-21T10:45:54+00:00\n"
|
||||
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
|
||||
"Language: id_ID\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
2881
lang/acf-it_IT.po
2881
lang/acf-it_IT.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
lang/acf-ja.mo
BIN
lang/acf-ja.mo
Binary file not shown.
990
lang/acf-ja.po
990
lang/acf-ja.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
1295
lang/acf-nb_NO.po
1295
lang/acf-nb_NO.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue