WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Купить персональные IPV4 и IPV6 прокси
функция не описана

wp_defer_comment_counting() WP 2.5.0

Whether to defer comment counting.

When setting $defer to true, all post comment counts will not be updated until $defer is set to false. When $defer is set to false, then all previously deferred updated post comment counts will then be automatically updated without having to call wp_update_comment_count() after.

Хуков нет.




wp_defer_comment_counting( $defer );

По умолчанию: null


  • Static. true/false. $_defer

Список изменений

С версии 2.5.0 Введена.

Код wp defer comment counting: wp-includes/comment.php WP 5.2.2

function wp_defer_comment_counting( $defer = null ) {
	static $_defer = false;

	if ( is_bool( $defer ) ) {
		$_defer = $defer;
		// flush any deferred counts
		if ( ! $defer ) {
			wp_update_comment_count( null, true );

	return $_defer;