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 |
---|---|
96 | * |
97 | * At the time of this action, the only recourse is to redirect somewhere |
98 | * and exit. If you want to declare a particular network, do so earlier. |
99 | * |
100 | * @since 4.4.0 |
101 | * |
102 | * @param string $domain The domain used to search for a network. |
103 | * @param string $path The path used to search for a path. |
104 | */ |
105 | do_action( 'ms_network_not_found', $domain, $path ); |
106 |
|
107 | ms_not_installed( $domain, $path ); |
108 | } elseif ( $path === $current_site->path ) { |
109 | $current_blog = get_site_by_path( $domain, $path ); |
110 | } else { |
111 | // Search the network path + one more path segment (on top of the network path). |
112 | $current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) ); |
113 | } |
114 | } else { |
Line | Code |
124 |
|
125 | // The network declared by the site trumps any constants. |
126 | if ( $current_blog && $current_blog->site_id != $current_site->id ) { |
127 | $current_site = WP_Network::get_instance( $current_blog->site_id ); |
128 | } |
129 |
|
130 | // No network has been found, bail. |
131 | if ( empty( $current_site ) ) { |
132 | /** This action is documented in wp-includes/ms-settings.php */ |
133 | do_action( 'ms_network_not_found', $domain, $path ); |
134 |
|
135 | ms_not_installed( $domain, $path ); |
136 | } |
137 |
|
138 | // @todo Investigate when exactly this can occur. |
139 | if ( empty( $current_blog ) && wp_installing() ) { |
140 | $current_blog = new stdClass; |
141 | $current_blog->blog_id = $blog_id = 1; |
142 | } |