WPSEO_Register_Capabilities::register_hooks()publicYoast 1.0

Registers the hooks.

{} Это метод класса: WPSEO_Register_Capabilities{}

Хуков нет.

Возвращает

null. Ничего.

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

$WPSEO_Register_Capabilities = new WPSEO_Register_Capabilities();
$WPSEO_Register_Capabilities->register_hooks();

Код WPSEO_Register_Capabilities::register_hooks() Yoast 19.10

public function register_hooks() {
	add_action( 'wpseo_register_capabilities', [ $this, 'register' ] );

	if ( is_multisite() ) {
		add_action( 'user_has_cap', [ $this, 'filter_user_has_wpseo_manage_options_cap' ], 10, 4 );
	}

	/**
	 * Maybe add manage_privacy_options capability for wpseo_manager user role.
	 */
	add_filter( 'map_meta_cap', [ $this, 'map_meta_cap_for_seo_manager' ], 10, 2 );
}