wp_roles_init хук-событиеWP 4.7.0

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

Использование

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.

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.