在返回站点之前检查博客是否是公共的。
privacy_ping_filter(mixed $sites)
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$sites | (mixed) | 必需 | 如果博客是公开的,将返回;如果不公开,将不返回。 |
返回(Return)
(mixed)如果blog不是公共的,则返回空string;如果site是公共的,则返回$sites。
源码(Source)
/**
* Check whether blog is public before returning sites.
*
* @since 2.1.0
*
* @param mixed $sites Will return if blog is public, will not return if not public.
* @return mixed Empty string if blog is not public, returns $sites, if site is public.
*/
function privacy_ping_filter($sites) {
if ( '0' != get_option('blog_public') )
return $sites;
else
return '';
}
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.1.0 | wp-includes/comment.php:2908 | 0 | 1 function |