wp_maybe_update_network_site_counts_on_update

Advertisement

Summery Summery

Updates the count of sites for a network based on a changed site.

Syntax Syntax

wp_maybe_update_network_site_counts_on_update( WP_Site $new_site, WP_Site|null $old_site = null )

Parameters Parameters

$new_site

(Required) The site object that has been inserted, updated or deleted.

$old_site

(Optional) If $new_site has been updated, this must be the previous state of that site.

Default value: null

Source Source

File: wp-includes/ms-site.php

	return delete_metadata( 'blog', null, $meta_key, '', true );
}

/**
 * Updates the count of sites for a network based on a changed site.
 *
 * @since 5.1.0
 *
 * @param WP_Site      $new_site The site object that has been inserted, updated or deleted.
 * @param WP_Site|null $old_site Optional. If $new_site has been updated, this must be the previous
 *                               state of that site. Default null.

Advertisement

Changelog Changelog

Changelog
Version Description
5.1.0 Introduced.

Advertisement

Leave a Reply