Make WordPress Core


Ignore:
Timestamp:
09/13/2015 11:39:20 PM (8 years ago)
Author:
jeremyfelt
Message:

Multisite: Implement the get_by_path method in WP_Network.

Move the internals of get_network_by_path() to WP_Network() and allow network objects to be retrieved by passing a requested domain and path.

Props johnjamesjacoby, jeremyfelt, drewapicture, wonderboymusic.
See #31985.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-settings.php

    r34097 r34099  
    8888        }
    8989        if ( empty( $current_site ) ) {
    90             $current_site = get_network_by_path( $domain, $path, 1 );
     90            $current_site = WP_Network::get_by_path( $domain, $path, 1 );
    9191        }
    9292
     
    119119        } else {
    120120            // If you don't have a site with the same domain/path as a network, you're pretty screwed, but:
    121             $current_site = get_network_by_path( $domain, $path, 1 );
     121            $current_site = WP_Network::get_by_path( $domain, $path, 1 );
    122122        }
    123123    }
Note: See TracChangeset for help on using the changeset viewer.