Make WordPress Core

Ticket #31702: 31702-opt-2.diff

File 31702-opt-2.diff, 800 bytes (added by rmccue, 10 years ago)

Option 2: Add network-not-found hook to match site-not-found hook

  • wp-includes/ms-settings.php

    diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php
    index 7b35e76..7621bab 100644
    a b if ( !isset( $current_site ) || !isset( $current_blog ) ) { 
    111111
    112112        // No network has been found, bail.
    113113        if ( empty( $current_site ) ) {
     114                /**
     115                 * Fires when neither the network nor site can be determined.
     116                 *
     117                 * At the time of this action, the only recourse is to redirect somewhere
     118                 * and exit. If you want to declare a particular network, do so earlier.
     119                 *
     120                 * @param string $domain The domain used to search for a site.
     121                 * @param string $path   The path used to search for a site.
     122                 */
     123                do_action( 'ms_network_not_found', $current_site, $domain, $path );
     124
    114125                ms_not_installed();
    115126        }
    116127