WordPress 4.2.3
[autoinstalls/wordpress.git] / wp-includes / capabilities.php
index 588432dcfc717d272bf5ca4e3e687380b76700ee..8a3d335030a7ee5b39021cbce49f1bd4c22ea6bd 100644 (file)
@@ -1143,8 +1143,10 @@ function map_meta_cap( $cap, $user_id ) {
        case 'edit_post':
        case 'edit_page':
                $post = get_post( $args[0] );
-               if ( empty( $post ) )
+               if ( empty( $post ) ) {
+                       $caps[] = 'do_not_allow';
                        break;
+               }
 
                if ( 'revision' == $post->post_type ) {
                        $post = get_post( $post->post_parent );