wp_roles_init
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
wp-includes/class-wp-roles.php 321
do_action( 'wp_roles_init', $this );