首页 WordPress函数大全 domain_exists()

domain_exists()

2020-05-01 / 5115阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

domain_exists( string $domain, string $path, int $network_id = 1 )

Checks whether a site name is already taken.

描述

The name is the site’s subdomain or the site’s subdirectory path depending>

参数

$domain

(string)
(Required)
The domain to be checked.

$path

(string)
(Required)
The path to be checked.

$network_id

(int)
(Optional)
Network ID. Relevant>Default value: 1

返回

(int|null) The site ID if the site name exists, null otherwise.

大家谈论
    我的见解