Make WordPress Core

Ticket #33900: 33900.2.patch

File 33900.2.patch, 610 bytes (added by spacedmonkey, 9 years ago)
  • wp-includes/load.php

    diff --git a/wp-includes/load.php b/wp-includes/load.php
    index 34f1b59..f55b513 100644
    a b function get_current_blog_id() { 
    774774        return absint($blog_id);
    775775}
    776776
     777/**
     778  * Retrieve the current network ID.
     779  *
     780  * @since 4.5.0
     781  *
     782  * @global object $current_site
     783  *
     784  * @return int Network id
     785  */
     786 function get_current_network_id() {
     787    global $current_site;
     788    if ( !$current_site instanceof WP_Network ) {
     789        return 1;
     790    }
     791    return $current_site->id;
     792 }
    777793/**
    778794 * Attempt an early load of translations.
    779795 *