Add get_role() convenience wrapper.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-29 18:47:28 +00:00
parent cee0f1cbca
commit 1a351ef8c0
1 changed files with 7 additions and 0 deletions

View File

@ -279,6 +279,13 @@ function current_user_can($capability) {
return call_user_func_array(array(&$current_user, 'has_cap'), $args);
}
// Convenience wrapper around $wp_roles.
function get_role($role) {
global $wp_roles;
return $wp_roles->get_role($role);
}
//
// These are deprecated. Use current_user_can().
//