wp_roles_init action-hookWP 4.7.0

Fires after the roles have been initialized, allowing plugins to add their own roles.

Usage

add_action( 'wp_roles_init', 'wp_kama_roles_init_action' );

/**
 * Function for `wp_roles_init` action-hook.
 * 
 * @param WP_Roles $wp_roles A reference to the WP_Roles object.
 *
 * @return void
 */
function wp_kama_roles_init_action( $wp_roles ){

	// action...
}
$wp_roles(WP_Roles)
A reference to the WP_Roles object.

Changelog

Since 4.7.0 Introduced.

Where the hook is called

WP_Roles::init_roles()
wp_roles_init
wp-includes/class-wp-roles.php 303
do_action( 'wp_roles_init', $this );

Where the hook is used in WordPress

Usage not found.