WordPress at Your Fingertips
function is not described

_update_posts_count_on_delete() WP 4.0.0

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

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 4.0.0 Introduced.

Code of _update_posts_count_on_delete() WP 5.7.2

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