mirror of
git://develop.git.wordpress.org/
synced 2025-04-14 17:12:13 +02:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
48683a21fe
commit
69718b2612
src
@ -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 );
|
||||
}
|
||||
|
@ -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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user