WPSEO_Abstract_Capability_Manager::get_wp_roles() protected Yoast 1.0
Returns a list of WP_Role roles.
The string array of role names are converted to actual WP_Role objects. These are needed to be able to use the API on them.
{} Это метод класса: WPSEO_Abstract_Capability_Manager{}
Хуков нет.
Возвращает
WP_Role[]
. List of WP_Role objects.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_wp_roles( $roles );
- $roles(массив) (обязательный)
- Roles to retrieve the objects for.
Код WPSEO_Abstract_Capability_Manager::get_wp_roles() WPSEO Abstract Capability Manager::get wp roles Yoast 16.1.1
protected function get_wp_roles( array $roles ) {
$wp_roles = array_map( 'get_role', $roles );
return array_filter( $wp_roles );
}