Fires when a network can be determined but a site cannot.


do_action( 'ms_site_not_found', (object) $current_site, (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 site, do so earlier.

Parameters (3)

0. $current_site (object)
The network that had been determined.
1. $domain (string)
The domain used to search for a site.
2. $path (string)
The path used to search for a site.


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

Defined (1)

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

  1. do_action( 'ms_site_not_found', $current_site, $domain, $path );