wpseo_get_roles

List all the available user roles.

Description

(array) wpseo_get_roles(); 

Returns (array)

$roles


Usage

  1. if ( !function_exists( 'wpseo_get_roles' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/inc/wpseo-functions-deprecated.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpseo_get_roles(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/wpseo-functions-deprecated.php  
  1. function wpseo_get_roles() { 
  2. _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::get_roles()' ); 
  3.  
  4. return WPSEO_Utils::get_roles();