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 |
---|---|
903 | * |
904 | * Returning a non-null value will effectively short-circuit the function, returning |
905 | * that value instead. |
906 | * |
907 | * @since 5.1.0 |
908 | * |
909 | * @param bool|null $pre The value to return, if not null. |
910 | * @param int $site_id The site ID that is being checked. |
911 | */ |
912 | $pre = apply_filters( 'pre_wp_is_site_initialized', null, $site_id ); |
913 | if ( null !== $pre ) { |
914 | return (bool) $pre; |
915 | } |
916 |
|
917 | $switch = false; |
918 | if ( get_current_blog_id() !== $site_id ) { |
919 | $switch = true; |
920 | remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 ); |
921 | switch_to_blog( $site_id ); |