wp_initialize_site_args filter-hookWP 5.1.0

Filters the arguments for initializing a site.

Usage

add_filter( 'wp_initialize_site_args', 'wp_kama_initialize_site_args_filter', 10, 3 );

/**
 * Function for `wp_initialize_site_args` filter-hook.
 * 
 * @param array      $args    Arguments to modify the initialization behavior.
 * @param WP_Site    $site    Site that is being initialized.
 * @param WP_Network $network Network that the site belongs to.
 *
 * @return array
 */
function wp_kama_initialize_site_args_filter( $args, $site, $network ){

	// filter...
	return $args;
}
$args(array)
Arguments to modify the initialization behavior.
$site(WP_Site)
Site that is being initialized.
$network(WP_Network)
Network that the site belongs to.

Changelog

Since 5.1.0 Introduced.

Where the hook is called

wp_initialize_site()
wp_initialize_site_args
wp-includes/ms-site.php 676
$args = apply_filters( 'wp_initialize_site_args', $args, $site, $network );

Where the hook is used in WordPress

Usage not found.