wpseo_register_roles хук-событиеYoast 1.0

Register capabilities, to make sure they are cleaned up.

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

add_action( 'wpseo_register_roles', 'wp_kama_wpseo_register_roles_action' );

/**
 * Function for `wpseo_register_roles` action-hook.
 * 
 * @return void
 */
function wp_kama_wpseo_register_roles_action(){

	// action...
}

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

_wpseo_deactivate()
wpseo_register_roles
WPSEO_Upgrade::upgrade_55()
wpseo_register_roles
_wpseo_activate()
wpseo_register_roles
yoast/wp-seo-main.php 255
do_action( 'wpseo_register_roles' );
yoast/inc/class-upgrade.php 407
do_action( 'wpseo_register_roles' );
yoast/wp-seo-main.php 229
do_action( 'wpseo_register_roles' );

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

yoast/admin/roles/class-register-roles.php 19
add_action( 'wpseo_register_roles', [ $this, 'register' ] );