do_action( 'before_populate_network', int $network_id, string $domain, string $email, string $site_name, string $path, bool $subdomain_install )
- Since
- 6.9.0
Fires before a network is populated.
Compatibility
- WordPress
- since 6.9.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in 3 of the 5 tracked releases, added in 6.9.0.
Parameters
$network_idint- ID of network to populate.
$domainstring- The domain name for the network.
$emailstring- Email address for the network administrator.
$site_namestring- The name of the network.
$pathstring- The path to append to the network's domain name.
$subdomain_installbool- Whether the network is a subdomain installation or a subdirectory installation.
Where this hook fires · 1
wp-admin/includes/schema.php:1022populate_network()
Source code
<?php * @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. */ do_action( 'before_populate_network', $network_id, $domain, $email, $site_name, $path, $subdomain_install ); $errors = new WP_Error(); if ( '' === $domain ) { $errors->add( 'empty_domain', __( 'You must provide a domain name.' ) ); } if ( '' === $site_name ) {Changelog
Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.