diff --git a/wp-admin/includes/class-custom-background.php b/wp-admin/includes/class-custom-background.php index b818016b28..2eb3ccfd64 100644 --- a/wp-admin/includes/class-custom-background.php +++ b/wp-admin/includes/class-custom-background.php @@ -571,8 +571,9 @@ class Custom_Background { $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' ); set_theme_mod( 'background_image_thumb', sanitize_url( $thumbnail[0] ) ); - /** This action is documented in wp-admin/includes/class-custom-image-header.php */ - do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication. + /** This filter is documented in wp-admin/includes/class-custom-image-header.php */ + $file = apply_filters( 'wp_create_file_in_uploads', $file, $id ); // For replication. + $this->updated = true; } diff --git a/wp-admin/includes/class-custom-image-header.php b/wp-admin/includes/class-custom-image-header.php index 9df725af0c..ee3bcb12ec 100644 --- a/wp-admin/includes/class-custom-image-header.php +++ b/wp-admin/includes/class-custom-image-header.php @@ -882,14 +882,16 @@ endif; $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) ); /** - * Fires after the header image is set or an error is returned. + * Filters the attachment file path after the custom header or background image is set. + * + * Used for file replication. * * @since 2.1.0 * * @param string $file Path to the file. * @param int $attachment_id Attachment ID. */ - do_action( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication. + $file = apply_filters( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication. return $this->finished(); } elseif ( $width > $max_width ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 9fd2298c56..98ce719cc5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-beta4-56928'; +$wp_version = '6.4-beta4-56929'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.