WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WPSEO_Capability_Manager_WP::remove() public Yoast 1.0

Unregisters the capabilities from the system.

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

Хуков нет.

Возвращает

null.

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

$WPSEO_Capability_Manager_WP = new WPSEO_Capability_Manager_WP();
$WPSEO_Capability_Manager_WP->remove();

Код WPSEO_Capability_Manager_WP::remove() Yoast 15.1.1

<?php
public function remove() {
	// Remove from any roles it has been added to.
	$roles = wp_roles()->get_names();
	$roles = array_keys( $roles );

	foreach ( $this->capabilities as $capability => $_roles ) {
		$registered_roles = array_unique( array_merge( $roles, $this->capabilities[ $capability ] ) );

		// Allow filtering of roles.
		$filtered_roles = $this->filter_roles( $capability, $registered_roles );

		$wp_roles = $this->get_wp_roles( $filtered_roles );
		foreach ( $wp_roles as $wp_role ) {
			$wp_role->remove_cap( $capability );
		}
	}
}