Warning: This hook has been deprecated. Use ‘wp_initialize_site’ instead.

wpmu_new_blog WordPress Hook

The wpmu_new_blog hook is triggered when a new site is created in a WordPress Multisite network. This hook can be used to perform any actions that need to be taken when a new site is created, such as sending an email notification or creating a user account for the new site.

do_action_deprecated( 'wpmu_new_blog', int $site_id, int $user_id, string $domain, string $path, int $network_id, array $meta ) #

Fires immediately after a new site is created.


Parameters

$site_id

(int)Site ID.

$user_id

(int)User ID.

$domain

(string)Site domain.

$path

(string)Site path.

$network_id

(int)Network ID. Only relevant on multi-network installations.

$meta

(array)Meta data. Used to set initial site options.


Top ↑

More Information

wpmu_new_blog is an action triggered whenever a new blog is created within a multisite network.


Top ↑

Source

File: wp-includes/ms-site.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.1.0Use 'wp_initialize_site' instead.
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.