after_upgrade_to_multisite
Fires after a network is created when converting a single site to multisite.
Usage
add_action( 'after_upgrade_to_multisite', 'wp_kama_after_upgrade_to_multisite_action', 10, 6 );
/**
* Function for `after_upgrade_to_multisite` action-hook.
*
* @param int $network_id ID of network created.
* @param string $domain The domain name for the network.
* @param string $email Email address for the network administrator.
* @param string $site_name The name of the network.
* @param string $path The path to append to the network's domain name.
* @param bool $subdomain_install Whether the network is a subdomain installation or a subdirectory installation.
*
* @return void
*/
function wp_kama_after_upgrade_to_multisite_action( $network_id, $domain, $email, $site_name, $path, $subdomain_install ){
// action...
}
- $network_id(int)
- ID of network created.
- $domain(string)
- The domain name for the network.
- $email(string)
- Email address for the network administrator.
- $site_name(string)
- The name of the network.
- $path(string)
- The path to append to the network's domain name.
- $subdomain_install(true|false)
- Whether the network is a subdomain installation or a subdirectory installation.
Changelog
| Since 6.9.0 | Introduced. |
Where the hook is called
wp-admin/includes/schema.php 1155
do_action( 'after_upgrade_to_multisite', $network_id, $domain, $email, $site_name, $path, $subdomain_install );