WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 82 | |
| 83 | /** |
| 84 | * Fires when a site's initialization routine should be executed. |
| 85 | * |
| 86 | * @since 5.1.0 |
| 87 | * |
| 88 | * @param WP_Site $new_site New site object. |
| 89 | * @param array $args Arguments for the initialization. |
| 90 | */ |
| 91 | do_action( 'wp_initialize_site', $new_site, $args ); |
| 92 | |
| 93 | // Only compute extra hook parameters if the deprecated hook is actually in use. |
| 94 | if ( has_action( 'wpmu_new_blog' ) ) { |
| 95 | $user_id = ! empty( $args['user_id'] ) ? $args['user_id'] : 0; |
| 96 | $meta = ! empty( $args['options'] ) ? $args['options'] : array(); |
| 97 | |
| 98 | /** |
| 99 | * Fires immediately after a new site is created. |
| 100 | * |