update_comment_cache

Advertisement

Summery Summery

Updates the comment cache of given comments.

Syntax Syntax

update_comment_cache( WP_Comment[] $comments, bool $update_meta_cache = true )

Description Description

Will add the comments in $comments to the cache. If comment ID already exists in the comment cache then it will not be updated. The comment is added to the cache using the comment group with the key using the ID of the comments.

Parameters Parameters

$comments

(Required) Array of comment objects

$update_meta_cache

(Optional) Whether to update commentmeta cache.

Default value: true

Source Source

File: wp-includes/comment.php

	if ( '0' != get_option( 'blog_public' ) ) {
		return $sites;
	} else {
		return '';
	}
}

/**
 * Send a Trackback.
 *
 * Updates database when sending trackback to prevent duplicates.
 *
 * @since 0.71
 *

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced the $update_meta_cache parameter.
2.3.0 Introduced.

Advertisement

Leave a Reply