wp_initialize_site

wp_initialize_site

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('wp_initialize_site') is found 1 times:

  • /wp-includes/ms-site.php line 105
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    *
     * @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();

See this hook used in plugins: