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 |
---|---|
1717 | * |
1718 | * Return false to disable sending the email. |
1719 | * |
1720 | * @since 5.6.0 |
1721 | * |
1722 | * @param bool $send Whether to send the email. |
1723 | * @param WP_Site $site Site object of the new site. |
1724 | * @param WP_User $user User object of the administrator of the new site. |
1725 | */ |
1726 | if ( ! apply_filters( 'send_new_site_email', true, $site, $user ) ) { |
1727 | return false; |
1728 | } |
1729 |
|
1730 | $switched_locale = false; |
1731 | $network_admin = get_user_by( 'email', $email ); |
1732 |
|
1733 | if ( $network_admin ) { |
1734 | // If the network admin email address corresponds to a user, switch to their locale. |
1735 | $switched_locale = switch_to_locale( get_user_locale( $network_admin ) ); |