wpseek.com
WordPress开发者和主题制作者的搜索引擎



pre_get_main_site_id › WordPress过滤钩子

Since4.9.0
已弃用n/a
apply_filters( 'pre_get_main_site_id', null, $this )
参数: (2)
  • (int|null) $main_site_id If a positive integer is returned, it is interpreted as the main site ID.
    Required: Yes
  • (WP_Network) $network The network object for which the main site was detected.
    Required: Yes
定义在:
文档:

Filters the main site ID.

Returning a positive integer will effectively short-circuit the function.





源码

$main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this );