wphooks.info - wp_initialize_site

wp_initialize_site

(trunk - 5.1-alpha-44286)

*** New in trunk ***

The hook occurs in the following file:

wp-includes/ms-blogs.php:
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
	do_action( 'wp_insert_site', $new_site );

	/**
	 * Fires when a site's initialization routine should be executed.
	 *
	 * @since 5.0.0
	 *
	 * @param WP_Site $new_site New site object.
	 * @param array   $args     Arguments for the initialization.
	 */
	do_action( 'wp_initialize_site', $new_site, $args );

	// Only compute extra hook parameters if the deprecated hook is actually in use.
	if ( has_action( 'wpmu_new_blog' ) ) {
		$user_id = ! empty( $args['user_id'] ) ? $args['user_id'] : 0;
		$meta    = ! empty( $args['options'] ) ? $args['options'] : array();

		/**
		 * Fires immediately after a new site is created.
		 *