_update_posts_count_on_transition_post_status

SummerySummery

Handler for updating the current site’s posts count when a post status changes.

Syntax

_update_posts_count_on_transition_post_status( string $new_status, string $old_status, WP_Post $post = null )

ParametersParameters

$new_status

(string) (Required) The status the post is changing to.

$old_status

(string) (Required) The status the post is changing from.

$post

(WP_Post) (Optional) Post object

Default value: null

SourceSource

File: wp-includes/ms-blogs.php


			

ChangelogChangelog

Changelog
Version Description
4.9.0 Added the $post parameter.
4.0.0 Introduced.
Scroll to Top