ms_network_not_found

Fires when a network cannot be found based on the requested domain and path.

Description

do_action( 'ms_network_not_found', (string) $domain, (string) $path ); 

At the time of this action, the only recourse is to redirect somewhere and exit. If you want to declare a particular network, do so earlier.

Parameters (2)

0. $domain (string)
The domain used to search for a network.
1. $path (string)
The path used to search for a path.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'ms_network_not_found', $domain, $path ); 
The following example is for adding a hook callback.
  1. // define the ms_network_not_found callback 
  2. function action_ms_network_not_found( $domain, $path ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'ms_network_not_found', 'action_ms_network_not_found', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'ms_network_not_found', 'action_ms_network_not_found', 10, 2 ); 

Defined (2)

The action is defined in the following location(s).

/wp-includes/ms-load.php  
  1. do_action( 'ms_network_not_found', $domain, $path ); 
  1. do_action( 'ms_network_not_found', $domain, $path );