首页 WordPress函数大全 get_site()

get_site()

2020-05-01 / 3091阅 / 悠然

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

get_site( WP_Site|int|null $site = null )

Retrieves site data given a site ID or site object.

描述

Site data will be cached and returned after being passed through a filter. If the provided site is empty, the current site global will be used.

参数

$site

(WP_Site|int|null)
(Optional)
Site to retrieve. Default is the current site.

Default value: null

返回

(WP_Site|null) The site object or null if not found.

大家谈论
    我的见解