Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: before_populate_network

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1013       * @since 6.9.0
1014       *
1015       * @param int    $network_id        ID of network to populate.
1016       * @param string $domain            The domain name for the network.
1017       * @param string $email             Email address for the network administrator.
1018       * @param string $site_name         The name of the network.
1019       * @param string $path              The path to append to the network's domain name.
1020       * @param bool   $subdomain_install Whether the network is a subdomain installation or a subdirectory installation.
1021       */
1022      do_action( 'before_populate_network', $network_id, $domain, $email, $site_name, $path, $subdomain_install );
1023
1024      $errors = new WP_Error();
1025      if ( '' === $domain ) {
1026           $errors->add( 'empty_domain', __( 'You must provide a domain name.' ) );
1027      }
1028      if ( '' === $site_name ) {
1029           $errors->add( 'empty_sitename', __( 'You must provide a name for your network of sites.' ) );
1030      }
1031