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



current_user_can_for_blog › WordPress Function

Since3.0.0
已弃用6.7.0
› current_user_can_for_blog ( $blog_id, $capability, $args )
参数: (3)
  • (int) $blog_id Site ID.
    Required: Yes
  • (string) $capability Capability name.
    Required: Yes
  • (mixed) $args Optional further parameters, typically starting with an object ID.
    Required: Yes
返回:
  • (bool) Whether the user has the given capability.
定义在:
文档:
Change Log:
  • 5.3.0
  • 5.8.0

Returns whether the current user has the specified capability for a given site.



源码

function current_user_can_for_blog( $blog_id, $capability, ...$args ) {
	return current_user_can_for_site( $blog_id, $capability, ...$args );
}