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



wp_roles › WordPress Function

Since4.3.0
已弃用n/a
wp_roles ( 没有参数 )
返回:
  • (WP_Roles) WP_Roles global instance if not already instantiated.
定义在:
文档:

Retrieves the global WP_Roles instance and instantiates it if necessary.



Related Functions: wp_styles, wp_rss, wp_robots, wp_kses, wp_cron

源码

function wp_roles() {
	global $wp_roles;

	if ( ! isset( $wp_roles ) ) {
		$wp_roles = new WP_Roles();
	}
	return $wp_roles;
}