WordPress at a glance
функция не описана

_update_posts_count_on_delete() WP 4.0.0

Handler for updating the current site's posts count when a post is deleted.

Хуков нет.

Возвращает

Null. Ничего.

Использование

_update_posts_count_on_delete( $post_id );
$post_id(int) (required)
Post ID.

Changelog

Since 4.0.0 Introduced.

Код _update_posts_count_on_delete() WP 5.5.1

<?php
function _update_posts_count_on_delete( $post_id ) {
	$post = get_post( $post_id );

	if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
		return;
	}

	update_posts_count();
}