Skip to content

Commit

Permalink
Updates to 6.2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ACF committed Feb 8, 2024
1 parent f856221 commit ef46740
Show file tree
Hide file tree
Showing 134 changed files with 9,081 additions and 6,888 deletions.
36 changes: 24 additions & 12 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.5
* Version: 6.2.6.1
* 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.5';
public $version = '6.2.6.1';

/**
* The plugin settings array.
Expand Down Expand Up @@ -90,6 +90,9 @@ public function initialize() {
$this->define( 'ACF_FIELD_API_VERSION', 5 );
$this->define( 'ACF_UPGRADE_VERSION', '5.5.0' ); // Highest version with an upgrade routine. See upgrades.php.

// Register activation hook.
register_activation_hook( __FILE__, array( $this, 'acf_plugin_activated' ) );

// Define settings.
$this->settings = array(
'name' => __( 'Advanced Custom Fields', 'acf' ),
Expand Down Expand Up @@ -215,12 +218,6 @@ public function initialize() {
acf_include( 'includes/admin/admin-upgrade.php' );
}

// Include polyfill for < PHP7 unserialize.
if ( PHP_VERSION_ID < 70000 ) {
acf_include( 'vendor/polyfill-unserialize/src/Unserialize.php' );
acf_include( 'vendor/polyfill-unserialize/src/DisallowedClassesSubstitutor.php' );
}

// Include legacy.
acf_include( 'includes/legacy/legacy-locations.php' );

Expand Down Expand Up @@ -617,7 +614,7 @@ public function posts_where( $where, $wp_query ) {
* @date 3/5/17
* @since 5.5.13
*
* @param string $name The constant name.
* @param string $name The constant name.
* @param mixed $value The constant value.
* @return void
*/
Expand Down Expand Up @@ -659,7 +656,7 @@ public function get_setting( $name ) {
* @date 28/09/13
* @since 5.0.0
*
* @param string $name The setting name.
* @param string $name The setting name.
* @param mixed $value The setting value.
* @return true
*/
Expand Down Expand Up @@ -687,7 +684,7 @@ public function get_data( $name ) {
* @date 28/09/13
* @since 5.0.0
*
* @param string $name The data name.
* @param string $name The data name.
* @param mixed $value The data value.
* @return void
*/
Expand Down Expand Up @@ -732,7 +729,7 @@ public function new_instance( $class ) {
* @since 5.9.0
*
* @param string $key Key name.
* @return bool
* @return boolean
*/
public function __isset( $key ) {
return in_array( $key, array( 'locations', 'json' ), true );
Expand All @@ -756,6 +753,21 @@ public function __get( $key ) {
}
return null;
}

/**
* Plugin Activation Hook
*
* @since 6.2.6
*/
public function acf_plugin_activated() {
// Set the first activated version of ACF.
if ( null === get_option( 'acf_first_activated_version', null ) ) {
// If acf_version is set, this isn't the first activated version, so leave it unset so it's legacy.
if ( null === get_option( 'acf_version', null ) ) {
update_option( 'acf_first_activated_version', ACF_VERSION, true );
}
}
}
}

/**
Expand Down
3 changes: 2 additions & 1 deletion assets/build/css/acf-field-group.css

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/css/acf-field-group.css.map

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/build/css/acf-global.css

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/css/acf-global.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/build/css/acf-global.min.css

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions assets/build/css/pro/acf-pro-input.css

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/css/pro/acf-pro-input.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/build/css/pro/acf-pro-input.min.css

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion 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.

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

Large diffs are not rendered by default.

49 changes: 35 additions & 14 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.

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

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions includes/acf-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,7 @@ function acf_sanitize_files_value_array( $array, $sanitize_function ) {
*/
function acf_maybe_unserialize( $data ) {
if ( is_serialized( $data ) ) { // Don't attempt to unserialize data that wasn't serialized going in.
if ( PHP_VERSION_ID >= 70000 ) {
return @unserialize( trim( $data ), array( 'allowed_classes' => false ) ); //phpcs:ignore -- code only runs on PHP7+
} else {
return @\ACF\Brumann\Polyfill\unserialize::unserialize( trim( $data ), array( 'allowed_classes' => false ) );
}
return @unserialize( trim( $data ), array( 'allowed_classes' => false ) ); //phpcs:ignore -- allowed classes is false.
}

return $data;
Expand Down
10 changes: 4 additions & 6 deletions includes/acf-value-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,15 @@ function acf_get_value( $post_id, $field ) {
acf_add_filter_variations( 'acf/load_value', array( 'type', 'name', 'key' ), 2 );

/**
* acf_format_value
*
* Returns a formatted version of the provided value.
*
* @since 5.0.0
*
* @param mixed $value The field value.
* @param integer|string $post_id The post id.
* @param array $field The field array.
* @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, $escape_html = false ) {
Expand Down Expand Up @@ -169,7 +168,6 @@ function acf_format_value( $value, $post_id, $field, $escape_html = false ) {
* @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, $escape_html );

Expand Down
3 changes: 3 additions & 0 deletions includes/admin/admin-internal-post-type-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ public function admin_menu() {}
* @return string
*/
public function get_admin_url( $params = '' ) {
if ( isset( $_GET['paged'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- used as intval to return a page.
$params .= '&paged=' . intval( $_GET['paged'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended -- used as intval to return a page.
}
return admin_url( "edit.php?post_type={$this->post_type}{$params}" );
}

Expand Down
4 changes: 2 additions & 2 deletions includes/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function admin_enqueue_scripts() {
'acf_escaped_html_notice',
array(
'nonce' => wp_create_nonce( 'acf/dismiss_escaped_html_notice' ),
'show_details' => __( 'Show details', 'acf' ),
'hide_details' => __( 'Hide details', 'acf' ),
'show_details' => __( 'Show&nbsp;details', 'acf' ),
'hide_details' => __( 'Hide&nbsp;details', 'acf' ),
)
);
}
Expand Down
20 changes: 4 additions & 16 deletions includes/admin/views/acf-field-group/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
$div_attrs['class'] .= ' acf-field-is-endpoint';
}


// Misc template vars.
$field_label = acf_get_field_label( $field, 'admin' );
$field_type_label = acf_get_field_type_label( $field['type'] );
$field_label = acf_get_field_label( $field, 'admin' );
$field_type_label = acf_get_field_type_label( $field['type'] );
$field_type_supports = acf_get_field_type_prop( $field['type'], 'supports' );

if ( acf_is_pro() && acf_get_field_type_prop( $field['type'], 'pro' ) && ! acf_pro_is_license_active() ) {
$field_type_label .= '<span class="acf-pro-label acf-pro-label-field-type">PRO</span>';
Expand Down Expand Up @@ -189,20 +191,6 @@
<?php
break;
case 'validation':
// required
acf_render_field_setting(
$field,
array(
'label' => __( 'Required', 'acf' ),
'instructions' => '',
'type' => 'true_false',
'name' => 'required',
'ui' => 1,
'class' => 'field-required',
),
true
);

do_action( "acf/field_group/render_field_settings_tab/{$tab_key}", $field );
?>
<div class="acf-field-type-settings" data-parent-tab="<?php echo esc_attr( $tab_key ); ?>">
Expand Down
Loading

0 comments on commit ef46740

Please sign in to comment.