WP_User::get_role_caps()
now returns the caps it was already setting. The method was previously just setting $allprops
and requiring that property to be read.
Props nofearinc. Fixes #24962. git-svn-id: https://develop.svn.wordpress.org/trunk@25673 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6611067dee
commit
c03af6bbd7
@ -732,6 +732,8 @@ class WP_User {
|
||||
* @since 2.0.0
|
||||
* @uses $wp_roles
|
||||
* @access public
|
||||
*
|
||||
* @return array List of all capabilities for the user.
|
||||
*/
|
||||
function get_role_caps() {
|
||||
global $wp_roles;
|
||||
@ -750,6 +752,8 @@ class WP_User {
|
||||
$this->allcaps = array_merge( (array) $this->allcaps, (array) $the_role->capabilities );
|
||||
}
|
||||
$this->allcaps = array_merge( (array) $this->allcaps, (array) $this->caps );
|
||||
|
||||
return $this->allcaps;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user