wp_insert_site
Fires once a site has been inserted into the database.
Usage
add_action( 'wp_insert_site', 'wp_kama_insert_site_action' ); /** * Function for `wp_insert_site` action-hook. * * @param WP_Site $new_site New site object. * * @return void */ function wp_kama_insert_site_action( $new_site ){ // action... }
- $new_site(WP_Site)
- New site object.
Changelog
Since 5.1.0 | Introduced. |
Where the hook is called
wp-includes/ms-site.php 89
do_action( 'wp_insert_site', $new_site );
Where the hook is used in WordPress
wp-includes/ms-default-filters.php 45
add_action( 'wp_insert_site', 'wp_maybe_update_network_site_counts_on_update', 10, 1 );
wp-includes/ms-default-filters.php 48
add_action( 'wp_insert_site', 'wp_maybe_transition_site_statuses_on_update', 10, 1 );