WordPress.org

Make WordPress Core

Ticket #21142: 21142_2.diff

File 21142_2.diff, 669 bytes (added by jamescollins, 2 years ago)

Refreshed patch, uses intermediate $result variable to better readability

  • ms-functions.php

     
    10751075 */ 
    10761076function domain_exists($domain, $path, $site_id = 1) { 
    10771077        global $wpdb; 
    1078         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) ); 
     1078        $result = $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) ); 
     1079        return apply_filters( 'domain_exists', $result, $domain, $path, $site_id ); 
    10791080} 
    10801081 
    10811082/**