Make WordPress Core


Ignore:
Timestamp:
06/28/2016 09:28:48 PM (8 years ago)
Author:
jeremyfelt
Message:

Multisite: Replace wp_get_network() internals with get_network().

get_network() should be considered a replacement for wp_get_network().

Props flixos90.
Fixes #32504.

File:
1 edited

Legend:

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

    r37850 r37896  
    138138 * @since 3.9.0
    139139 * @since 4.4.0 Converted to leverage WP_Network
     140 * @since 4.6.0 Converted to use `get_network()`
    140141 *
    141142 * @param object|int $network The network's database row or ID.
     
    143144 */
    144145function wp_get_network( $network ) {
    145     if ( ! is_object( $network ) ) {
    146         $network = WP_Network::get_instance( $network );
    147     } else {
    148         $network = new WP_Network( $network );
     146    $network = get_network( $network );
     147    if ( null === $network ) {
     148        return false;
    149149    }
    150150
Note: See TracChangeset for help on using the changeset viewer.