WPSEO_Capability_Manager_Integration::filter_ure_capabilities_groups_tree()publicYoast 1.0

Adds Yoast SEO capability group in the User Role Editor plugin.

Метод класса: WPSEO_Capability_Manager_Integration{}

Хуков нет.

Возвращает

Массив. Filtered list of capabilty groups.

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

$WPSEO_Capability_Manager_Integration = new WPSEO_Capability_Manager_Integration();
$WPSEO_Capability_Manager_Integration->filter_ure_capabilities_groups_tree( $groups );
$groups(массив)
Current groups.
По умолчанию: []

Заметки

  • Смотрите: URE_Capabilities_Groups_Manager::get_groups_tree()

Код WPSEO_Capability_Manager_Integration::filter_ure_capabilities_groups_tree() Yoast 22.4

public function filter_ure_capabilities_groups_tree( $groups = [] ) {
	$groups = (array) $groups;

	$groups['wordpress-seo'] = [
		'caption' => 'Yoast SEO',
		'parent'  => 'custom',
		'level'   => 3,
	];

	return $groups;
}