]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/capabilities.php
Wordpress 2.8-scripts
[autoinstalls/wordpress.git] / wp-includes / capabilities.php
index ab6ec3524d7e9a813673337207c4b4018bf3cc51..cccd68daba7441ab92637656a1bc043d13661054 100644 (file)
@@ -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);
 }
 
 /**