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

Re-register capabilities to add the new view_site_health_checks capability to the SEO Manager role.

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

add_action( 'wpseo_register_capabilities', 'wp_kama_wpseo_register_capabilities_action' );

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

	// action...
}

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

WPSEO_Upgrade::upgrade_132()
wpseo_register_capabilities
wpseo_get_capabilities()
wpseo_register_capabilities
WPSEO_Upgrade::upgrade_55()
wpseo_register_capabilities
WPSEO_Capability_Manager_Integration::get_capabilities()
wpseo_register_capabilities
_wpseo_activate()
wpseo_register_capabilities
_wpseo_deactivate()
wpseo_register_capabilities
yoast/inc/class-upgrade.php 709
do_action( 'wpseo_register_capabilities' );
yoast/inc/wpseo-functions.php 234
do_action( 'wpseo_register_capabilities' );
yoast/inc/class-upgrade.php 407
do_action( 'wpseo_register_capabilities' );
yoast/wp-seo-main.php 232
do_action( 'wpseo_register_capabilities' );
yoast/wp-seo-main.php 256
do_action( 'wpseo_register_capabilities' );

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

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