From 7cec3803140a6f9121ca685ad966c29d1da9573e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 29 Nov 2005 18:47:28 +0000 Subject: [PATCH] Add get_role() convenience wrapper. git-svn-id: https://develop.svn.wordpress.org/trunk@3238 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/capabilities.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 4dac1bfc12..27b76f3244 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -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(). //