WordPress.org

Make WordPress Core

Ticket #17912: 17912.patch

File 17912.patch, 537 bytes (added by jakub.tyrcha, 3 years ago)
  • wp-includes/capabilities.php

     
    877877 
    878878                $post_type = get_post_type_object( $post->post_type ); 
    879879 
     880                if ( ! $post_type) { 
     881                        $cap = 'edit_published_posts'; 
     882                        $caps[] = 'edit_published_posts'; 
     883                        break; 
     884                } 
     885 
    880886                if ( ! $post_type->map_meta_cap ) { 
    881887                        $caps[] = $post_type->cap->$cap; 
    882888                        // Prior to 3.1 we would re-call map_meta_cap here.