Make WordPress Core

Ticket #31702: 31702-opt-both.diff

File 31702-opt-both.diff, 1.2 KB (added by rmccue, 9 years ago)

Options 1 & 2: Both hooks

  • wp-includes/ms-settings.php

    diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php
    index 7b35e76..7e62033 100644
    a b if ( !isset( $current_site ) || !isset( $current_blog ) ) { 
    109109                $current_site = wp_get_network( $current_blog->site_id );
    110110        }
    111111
     112        /**
     113         * Fires after the domain lookup process.
     114         *
     115         * This is a good time to hook in and set a default `$current_site` global
     116         * if one hasn't been determined, or to do any custom lookup handling.
     117         *
     118         * @param string $domain The domain used during the lookup process.
     119         * @param string $path   The path used during the lookup process.
     120         */
     121        do_action( 'ms_site_lookup', $domain, $path );
     122
    112123        // No network has been found, bail.
    113124        if ( empty( $current_site ) ) {
     125                /**
     126                 * Fires when neither the network nor site can be determined.
     127                 *
     128                 * At the time of this action, the only recourse is to redirect somewhere
     129                 * and exit. If you want to declare a particular network, do so earlier.
     130                 *
     131                 * @param string $domain The domain used to search for a site.
     132                 * @param string $path   The path used to search for a site.
     133                 */
     134                do_action( 'ms_network_not_found', $current_site, $domain, $path );
     135
    114136                ms_not_installed();
    115137        }
    116138