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

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

$old_site

(WP_Site|null) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.