A WordPress-centric search engine for devs and theme authors



wp_roles ›

Since4.3.0
Deprecatedn/a
wp_roles ( No parameters )
Returns:
  • (WP_Roles) WP_Roles global instance if not already instantiated.
Defined at:
Codex:

Retrieves the global WP_Roles instance and instantiates it if necessary.



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

Source

function wp_roles() {
	global $wp_roles;

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