X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/449d082fcc4873c1f7d363a0d9f7409be7f6e77d..refs/tags/wordpress-2.8-scripts:/wp-includes/capabilities.php diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index ab6ec352..cccd68da 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -534,9 +534,9 @@ class WP_User { $this->allcaps = array(); foreach ( (array) $this->roles as $role ) { $role =& $wp_roles->get_role( $role ); - $this->allcaps = array_merge( $this->allcaps, $role->capabilities ); + $this->allcaps = array_merge( (array) $this->allcaps, (array) $role->capabilities ); } - $this->allcaps = array_merge( $this->allcaps, $this->caps ); + $this->allcaps = array_merge( (array) $this->allcaps, (array) $this->caps ); } /** @@ -905,7 +905,7 @@ function map_meta_cap( $cap, $user_id ) { $caps[] = $cap; } - return $caps; + return apply_filters('map_meta_cap', $caps, $cap, $user_id, $args); } /**