Ticket #16956: 16956.3.diff
File 16956.3.diff, 952 bytes (added by , 11 years ago) |
---|
-
wp-includes/capabilities.php
1024 1024 } 1025 1025 1026 1026 $post_type = get_post_type_object( $post->post_type ); 1027 1028 if ( is_null( $post_type ) ) { 1029 $caps[] = 'do_not_allow'; 1030 break; 1031 } 1027 1032 1028 1033 if ( ! $post_type->map_meta_cap ) { 1029 1034 $caps[] = $post_type->cap->$cap; … … 1074 1079 } 1075 1080 1076 1081 $post_type = get_post_type_object( $post->post_type ); 1082 1083 if ( is_null( $post_type ) ) { 1084 $caps[] = 'do_not_allow'; 1085 break; 1086 } 1077 1087 1078 1088 if ( ! $post_type->map_meta_cap ) { 1079 1089 $caps[] = $post_type->cap->$cap; … … 1122 1132 } 1123 1133 1124 1134 $post_type = get_post_type_object( $post->post_type ); 1135 1136 if ( is_null( $post_type ) ) { 1137 $caps[] = 'do_not_allow'; 1138 break; 1139 } 1125 1140 1126 1141 if ( ! $post_type->map_meta_cap ) { 1127 1142 $caps[] = $post_type->cap->$cap;