WordPress.org

Make WordPress Core

Ticket #20589: ms-functions.diff

File ms-functions.diff, 520 bytes (added by ejdanderson, 6 years ago)
  • ms-functions.php

     
    10851085 */
    10861086function domain_exists($domain, $path, $site_id = 1) {
    10871087        global $wpdb;
     1088       
     1089        // To match insert_blog
     1090        $path = trailingslashit($path);
     1091        $site_id = (int) $site_id;
     1092       
    10881093        return $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s AND site_id = %d", $domain, $path, $site_id) );
    10891094}
    10901095