WordPress.org

Make WordPress Core

Ticket #21142: 21142_domain_exists.diff

File 21142_domain_exists.diff, 684 bytes (added by jamescollins, 6 years ago)
  • wp-includes/ms-functions.php

     
    10841084 */
    10851085function domain_exists($domain, $path, $site_id = 1) {
    10861086        global $wpdb;
    1087         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) );
     1087        return apply_filters( 'domain_exists', $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) ), $domain, $path, $site_id );
    10881088}
    10891089
    10901090/**