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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
345 | * |
346 | * At the time of this action, the only recourse is to redirect somewhere |
347 | * and exit. If you want to declare a particular network, do so earlier. |
348 | * |
349 | * @since 4.4.0 |
350 | * |
351 | * @param string $domain The domain used to search for a network. |
352 | * @param string $path The path used to search for a path. |
353 | */ |
354 | do_action( 'ms_network_not_found', $domain, $path ); |
355 |
|
356 | return false; |
357 | } elseif ( $path === $current_site->path ) { |
358 | $current_blog = get_site_by_path( $domain, $path ); |
359 | } else { |
360 | // Search the network path + one more path segment (on top of the network path). |
361 | $current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) ); |
362 | } |
363 | } else { |
Line | Code |
373 |
|
374 | // The network declared by the site trumps any constants. |
375 | if ( $current_blog && $current_blog->site_id != $current_site->id ) { |
376 | $current_site = WP_Network::get_instance( $current_blog->site_id ); |
377 | } |
378 |
|
379 | // No network has been found, bail. |
380 | if ( empty( $current_site ) ) { |
381 | /** This action is documented in wp-includes/ms-settings.php */ |
382 | do_action( 'ms_network_not_found', $domain, $path ); |
383 |
|
384 | return false; |
385 | } |
386 |
|
387 | // During activation of a new subdomain, the requested site does not yet exist. |
388 | if ( empty( $current_blog ) && wp_installing() ) { |
389 | $current_blog = new stdClass; |
390 | $current_blog->blog_id = $blog_id = 1; |
391 | $current_blog->public = 1; |