Add domain_exists filter. Props jamescollins. fixes #21142

git-svn-id: http://core.svn.wordpress.org/trunk@22065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-09-27 17:30:34 +00:00
parent c224c2fee5
commit 115d53941b

View File

@ -1075,7 +1075,8 @@ Disable these notifications: %3s'), $user->user_login, $_SERVER['REMOTE_ADDR'],
*/
function domain_exists($domain, $path, $site_id = 1) {
global $wpdb;
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) );
$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) );
return apply_filters( 'domain_exists', $result, $domain, $path, $site_id );
}
/**