Warning: This function has been deprecated. Use wp_lazyload_comment_meta() instead.

wp_queue_comments_for_comment_meta_lazyload( WP_Comment[] $comments )

Queues comments for metadata lazy-loading.


Parameters

$comments WP_Comment[] Required
Array of comment objects.

Top ↑

Source

File: wp-includes/deprecated.php. View all references

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 );
}


Top ↑

Changelog

Changelog
Version Description
6.3.0 Use wp_lazyload_comment_meta() instead.
4.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.