Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




domain_exists [ WordPress Function ]

domain_exists ( $domain, $path, $site_id = 1 )
Parameters:
  • (string) $domain The domain to be checked.
  • (string) $path The path to be checked.
  • (int) $site_id Optional. Relevant only on multi-network installs.
Returns:
  • (int)
Defined at:



Check whether a blogname is already taken.

Used during the new site registration process to ensure that each blogname is unique.

Source


<?php
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) );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics