Fires once a site has been inserted into the database.
Parameters
$new_site
WP_Site- New site object.
Source
do_action( 'wp_insert_site', $new_site );
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |
Fires once a site has been inserted into the database.
$new_site
WP_Sitedo_action( 'wp_insert_site', $new_site );
Version | Description |
---|---|
5.1.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
The hook
wpmu_new_blog
gives you a deprecated notice and tells you to usewp_insert_site
. Don’t do that,wp_insert_site
fires too early. Instead, use wp_initialize_site with a priority higher than100
, as in: