From d8c4000c53d4186b74a14c435ae44f547fde48d3 Mon Sep 17 00:00:00 2001 From: spacedmonkey Date: Thu, 25 May 2023 10:55:19 +0000 Subject: [PATCH] Comments: Move wp_queue_comments_for_comment_meta_lazyload function to the correct file. As of [55855] wp_queue_comments_for_comment_meta_lazyload was deprecated. But deprecate to wp-admin/deprecated.php and not wp-includes/deprecated.php.This is incorrect, as this is a public function and not an admin function. Props SergeyBiryukov, spacedmonkey. See #58301. Built from https://develop.svn.wordpress.org/trunk@55856 git-svn-id: http://core.svn.wordpress.org/trunk@55368 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/deprecated.php | 23 ----------------------- wp-includes/deprecated.php | 23 +++++++++++++++++++++++ wp-includes/version.php | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index 4fa4926040..04f7208422 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -1588,26 +1588,3 @@ function image_attachment_fields_to_save( $post, $attachment ) { return $post; } - -/** - * Queues comments for metadata lazy-loading. - * - * @since 4.5.0 - * @deprecated 6.3.0 Use wp_lazyload_comment_meta() instead. - * - * @param WP_Comment[] $comments Array of comment objects. - */ -function wp_queue_comments_for_comment_meta_lazyload( $comments ) { - _deprecated_function( __FUNCTION__, '6.3.0', 'wp_lazyload_comment_meta' ); - // Don't use `wp_list_pluck()` to avoid by-reference manipulation. - $comment_ids = array(); - if ( is_array( $comments ) ) { - foreach ( $comments as $comment ) { - if ( $comment instanceof WP_Comment ) { - $comment_ids[] = $comment->comment_ID; - } - } - } - - wp_lazyload_comment_meta( $comment_ids ); -} diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index d2885ef497..564bbc2a86 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -4639,3 +4639,26 @@ function _resolve_home_block_template() { function wlwmanifest_link() { _deprecated_function( __FUNCTION__, '6.3.0' ); } + +/** + * Queues comments for metadata lazy-loading. + * + * @since 4.5.0 + * @deprecated 6.3.0 Use wp_lazyload_comment_meta() instead. + * + * @param WP_Comment[] $comments Array of comment objects. + */ +function wp_queue_comments_for_comment_meta_lazyload( $comments ) { + _deprecated_function( __FUNCTION__, '6.3.0', 'wp_lazyload_comment_meta' ); + // Don't use `wp_list_pluck()` to avoid by-reference manipulation. + $comment_ids = array(); + if ( is_array( $comments ) ) { + foreach ( $comments as $comment ) { + if ( $comment instanceof WP_Comment ) { + $comment_ids[] = $comment->comment_ID; + } + } + } + + wp_lazyload_comment_meta( $comment_ids ); +} diff --git a/wp-includes/version.php b/wp-includes/version.php index 7486bb8aea..6098702f73 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55855'; +$wp_version = '6.3-alpha-55856'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.