Ticket #16714: 16714.3.diff
| File 16714.3.diff, 1.3 KB (added by , 13 years ago) |
|---|
-
wp-includes/post.php
1296 1296 'edit_others_posts' => 'edit_others_' . $plural_base, 1297 1297 'publish_posts' => 'publish_' . $plural_base, 1298 1298 'read_private_posts' => 'read_private_' . $plural_base, 1299 // Post creation capability simply maps to edit_posts by default: 1300 'create_posts' => 'edit_' . $plural_base, 1299 1301 ); 1300 1302 1301 1303 // Primitive capabilities used within map_meta_cap(): -
wp-includes/capabilities.php
1046 1046 $caps[] = $post_type->cap->delete_private_posts; 1047 1047 } 1048 1048 break; 1049 // current_user_can( 'create_posts', $post_type ) 1050 case 'create_post': 1051 case 'create_posts': 1052 $post_type = isset( $args[0] ) ? $args[0] : 'post'; 1053 $post_type_object = get_post_type_object( $post_type ); 1054 1055 if ( isset( $post_type_object->cap->create_posts ) ) 1056 $caps[] = $post_type_object->cap->create_posts; 1057 else 1058 $caps[] = $post_type_object->cap->edit_posts; 1059 1060 break; 1049 1061 // edit_post breaks down to edit_posts, edit_published_posts, or 1050 1062 // edit_others_posts 1051 1063 case 'edit_post':