Skip to content

Commit

Permalink
Updates to 6.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ACF committed Nov 29, 2023
1 parent 61bf366 commit 830e8b9
Show file tree
Hide file tree
Showing 255 changed files with 7,710 additions and 9,181 deletions.
6 changes: 2 additions & 4 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.3
* Version: 6.2.4
* 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.3';
public $version = '6.2.4';

/**
* The plugin settings array.
Expand Down Expand Up @@ -177,7 +177,6 @@ public function initialize() {
acf_include( 'includes/loop.php' );
acf_include( 'includes/media.php' );
acf_include( 'includes/revisions.php' );
acf_include( 'includes/updates.php' );
acf_include( 'includes/upgrades.php' );
acf_include( 'includes/validation.php' );
acf_include( 'includes/rest-api.php' );
Expand Down Expand Up @@ -783,5 +782,4 @@ function acf() {

// Instantiate.
acf();

} // class_exists check
1 change: 1 addition & 0 deletions assets/build/css/acf-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/acf-input.css.map

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

42 changes: 16 additions & 26 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.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/build/js/pro/acf-pro-ui-options-page.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-ui-options-page.js.map

Large diffs are not rendered by default.

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

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

13 changes: 7 additions & 6 deletions includes/acf-bidirectional-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
*
* @since 6.2
*
* @param array $target_item_ids The post, user or term IDs which should be updated with the origin item ID.
* @param int|string $post_id The ACF encoded origin post, user or term ID.
* @param array $field The field being updated on the origin post, user or term ID.
* @param string|false $target_prefix The ACF prefix for a post, user or term ID required for the update_field call for this field type.
* @param array $target_item_ids The post, user or term IDs which should be updated with the origin item ID.
* @param integer|string $post_id The ACF encoded origin post, user or term ID.
* @param array $field The field being updated on the origin post, user or term ID.
* @param string|false $target_prefix The ACF prefix for a post, user or term ID required for the update_field call for this field type.
*/
function acf_update_bidirectional_values( $target_item_ids, $post_id, $field, $target_prefix = false ) {

Expand Down Expand Up @@ -57,7 +57,7 @@ function acf_update_bidirectional_values( $target_item_ids, $post_id, $field, $t

// Prefix additions and subtractions for destinations which aren't posts.
if ( ! empty( $target_prefix ) ) {
$mapper = function( $v ) use ( $target_prefix ) {
$mapper = function ( $v ) use ( $target_prefix ) {
return $target_prefix . '_' . $v;
};
$additions = array_map( $mapper, $additions );
Expand Down Expand Up @@ -89,6 +89,7 @@ function acf_update_bidirectional_values( $target_item_ids, $post_id, $field, $t
* @since 6.2
*
* @param string $object_type The object type that will be updated on the target field, such as 'term', 'user' or 'post'.
*
* @return array An array of valid field type names (slugs) for the target of the bidirectional field.
*/
function acf_get_valid_bidirectional_target_types( $object_type ) {
Expand Down Expand Up @@ -153,7 +154,7 @@ function acf_build_bidirectional_relationship_field_target_args( $results, $opti

$field_groups = array_filter(
acf_get_field_groups(),
function( $field_group ) {
function ( $field_group ) {
return $field_group['active'];
}
);
Expand Down
7 changes: 2 additions & 5 deletions includes/acf-field-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ function acf_translate_field( $field = array() ) {

// Translate field settings if textdomain is set.
if ( $l10n && $l10n_textdomain ) {

$field['label'] = acf_translate( $field['label'] );
$field['instructions'] = acf_translate( $field['instructions'] );

Expand Down Expand Up @@ -470,7 +469,7 @@ function acf_get_field_count( $parent ) {
* @since 5.0.0
*
* @param int $count The number of fields.
* @param array $parent The field group or field array.
* @param array $parent The field group or field array.
*/
return apply_filters( 'acf/get_field_count', count( $raw_fields ), $parent );
}
Expand Down Expand Up @@ -604,7 +603,6 @@ function acf_render_fields( $fields, $post_id = 0, $el = 'div', $instruction = '
// Loop over and render fields.
if ( $fields ) {
foreach ( $fields as $field ) {

$field = apply_filters( 'acf/pre_render_field', $field, $post_id );

// Load value if not already loaded.
Expand Down Expand Up @@ -1323,7 +1321,6 @@ function acf_get_sub_field( $id, $field ) {

// return
return $sub_field;

}

// Register variation.
Expand Down Expand Up @@ -1588,7 +1585,7 @@ function acf_prepare_fields_for_import( $fields = array() ) {
}

// Iterate.
$i++;
++$i;
}

/**
Expand Down
1 change: 0 additions & 1 deletion includes/acf-hook-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,3 @@ function _acf_apply_deprecated_hook() {
// Return first arg.
return $args[0];
}

1 change: 0 additions & 1 deletion includes/acf-wp-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ function acf_get_object_id( $object ) {
}
} elseif ( isset( $object['id'] ) ) {
return (int) $object['id'];

} elseif ( isset( $object['ID'] ) ) {
return (int) $object['ID'];
}
Expand Down
1 change: 0 additions & 1 deletion includes/admin/admin-internal-post-type-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ public function deleted_post( $post_id ) {
acf_delete_internal_post_type( $post_id, $this->post_type );
}
}

}

endif; // Class exists check.
1 change: 0 additions & 1 deletion includes/admin/admin-internal-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ public function ajax_link_field_groups() {
)
);
}

}

endif; // Class exists check.
1 change: 0 additions & 1 deletion includes/admin/admin-options-pages-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function render() {
$view = array( 'screen_id' => $screen->id );
acf_get_view( 'options-page-preview', $view );
}

}

new ACF_Admin_Options_Preview();
Expand Down
15 changes: 0 additions & 15 deletions includes/admin/admin-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function __construct() {

// actions
add_action( 'admin_menu', array( $this, 'admin_menu' ), 15 );

}

/**
Expand All @@ -52,7 +51,6 @@ function register_tool( $class ) {

$instance = new $class();
$this->tools[ $instance->name ] = $instance;

}


Expand All @@ -71,7 +69,6 @@ function register_tool( $class ) {
function get_tool( $name ) {

return isset( $this->tools[ $name ] ) ? $this->tools[ $name ] : null;

}


Expand All @@ -90,7 +87,6 @@ function get_tool( $name ) {
function get_tools() {

return $this->tools;

}


Expand Down Expand Up @@ -119,7 +115,6 @@ function admin_menu() {

// actions
add_action( 'load-' . $page, array( $this, 'load' ) );

}


Expand Down Expand Up @@ -150,7 +145,6 @@ function load() {

// load acf scripts
acf_enqueue_scripts();

}

/**
Expand Down Expand Up @@ -187,7 +181,6 @@ function include_tools() {

// action
do_action( 'acf/include_admin_tools' );

}


Expand Down Expand Up @@ -216,7 +209,6 @@ function check_submit() {
$tool->submit();
}
}

}


Expand Down Expand Up @@ -254,12 +246,10 @@ function html() {

// add metabox
add_meta_box( 'acf-admin-tool-' . $tool->name, acf_esc_html( $tool->title ), array( $this, 'metabox_html' ), $screen->id, 'normal', 'default', array( 'tool' => $tool->name ) );

}

// view
acf_get_view( 'tools/tools', $view );

}


Expand All @@ -286,12 +276,10 @@ public function metabox_html( $post, $metabox ) {
acf_nonce_input( $tool->name );
echo '</form>';
}

}

// initialize
acf()->admin_tools = new acf_admin_tools();

endif; // class_exists check


Expand All @@ -311,7 +299,6 @@ public function metabox_html( $post, $metabox ) {
function acf_register_admin_tool( $class ) {

return acf()->admin_tools->register_tool( $class );

}


Expand All @@ -331,7 +318,6 @@ function acf_register_admin_tool( $class ) {
function acf_get_admin_tools_url() {

return admin_url( 'edit.php?post_type=acf-field-group&page=acf-tools' );

}


Expand All @@ -351,5 +337,4 @@ function acf_get_admin_tools_url() {
function acf_get_admin_tool_url( $tool = '' ) {

return acf_get_admin_tools_url() . '&tool=' . $tool;

}
7 changes: 3 additions & 4 deletions includes/admin/admin-upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function admin_menu() {
*/
function network_admin_menu() {
$network_upgrade_needed = get_site_transient( $this->network_upgrade_needed_transient );

// No transient value exists, so run the upgrade check.
if ( $network_upgrade_needed === false ) {
$network_upgrade_needed = $this->check_for_network_upgrades();
Expand All @@ -103,7 +103,7 @@ function network_admin_menu() {
/**
* Checks if an ACF database upgrade is required on any site in the
* multisite network.
*
*
* Stores the result in `$this->network_upgrade_needed_transient`,
* which is version-linked to ACF_UPGRADE_VERSION: the highest ACF
* version that requires an upgrade function to run. Bumping
Expand All @@ -119,7 +119,7 @@ function network_admin_menu() {
public function check_for_network_upgrades() {
$network_upgrade_needed = 'no';

$sites = get_sites(
$sites = get_sites(
array(
'number' => 0,
'fields' => 'ids', // Reduces PHP memory usage.
Expand Down Expand Up @@ -293,5 +293,4 @@ function network_admin_html() {

// instantiate
acf_new_instance( 'ACF_Admin_Upgrade' );

endif; // class_exists check
2 changes: 0 additions & 2 deletions includes/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,8 @@ public function ensure_submenu_selection( $submenu_file ) {
}
return $submenu_file;
}

}

// Instantiate.
acf_new_instance( 'ACF_Admin' );

endif; // class_exists check
Loading

0 comments on commit 830e8b9

Please sign in to comment.