diff --git src/wp-includes/post.php src/wp-includes/post.php
index 454e19a57f..16cb7dcec2 100644
|
|
|
function unregister_post_type( $post_type ) { |
| 1376 | 1376 | * Otherwise, an 's' will be added to the value for the plural form. After |
| 1377 | 1377 | * registration, capability_type will always be a string of the singular value. |
| 1378 | 1378 | * |
| 1379 | | * By default, seven keys are accepted as part of the capabilities array: |
| | 1379 | * By default, eight keys are accepted as part of the capabilities array: |
| 1380 | 1380 | * |
| 1381 | 1381 | * - edit_post, read_post, and delete_post are meta capabilities, which are then |
| 1382 | 1382 | * generally mapped to corresponding primitive capabilities depending on the |
| 1383 | 1383 | * context, which would be the post being edited/read/deleted and the user or |
| 1384 | 1384 | * role being checked. Thus these capabilities would generally not be granted |
| 1385 | 1385 | * directly to users or roles. |
| 1386 | | * |
| 1387 | 1386 | * - edit_posts - Controls whether objects of this post type can be edited. |
| 1388 | 1387 | * - edit_others_posts - Controls whether objects of this type owned by other users |
| 1389 | 1388 | * can be edited. If the post type does not support an author, then this will |
| 1390 | 1389 | * behave like edit_posts. |
| | 1390 | * - delete_posts - Controls whether objects of this post type can be deleted. |
| 1391 | 1391 | * - publish_posts - Controls publishing objects of this post type. |
| 1392 | 1392 | * - read_private_posts - Controls whether private objects can be read. |
| 1393 | 1393 | * |
| 1394 | 1394 | * These four primitive capabilities are checked in core in various locations. |
| 1395 | | * There are also seven other primitive capabilities which are not referenced |
| | 1395 | * There are also six other primitive capabilities which are not referenced |
| 1396 | 1396 | * directly in core, except in map_meta_cap(), which takes the three aforementioned |
| 1397 | 1397 | * meta capabilities and translates them into one or more primitive capabilities |
| 1398 | 1398 | * that must then be checked against the user or role, depending on the context. |
| 1399 | 1399 | * |
| 1400 | 1400 | * - read - Controls whether objects of this post type can be read. |
| 1401 | | * - delete_posts - Controls whether objects of this post type can be deleted. |
| 1402 | 1401 | * - delete_private_posts - Controls whether private objects can be deleted. |
| 1403 | 1402 | * - delete_published_posts - Controls whether published objects can be deleted. |
| 1404 | 1403 | * - delete_others_posts - Controls whether objects owned by other users can be |
| … |
… |
function get_post_type_capabilities( $args ) { |
| 1435 | 1434 | // Primitive capabilities used outside of map_meta_cap(): |
| 1436 | 1435 | 'edit_posts' => 'edit_' . $plural_base, |
| 1437 | 1436 | 'edit_others_posts' => 'edit_others_' . $plural_base, |
| | 1437 | 'delete_posts' => 'delete_' . $plural_base, |
| 1438 | 1438 | 'publish_posts' => 'publish_' . $plural_base, |
| 1439 | 1439 | 'read_private_posts' => 'read_private_' . $plural_base, |
| 1440 | 1440 | ); |
| … |
… |
function get_post_type_capabilities( $args ) { |
| 1443 | 1443 | if ( $args->map_meta_cap ) { |
| 1444 | 1444 | $default_capabilities_for_mapping = array( |
| 1445 | 1445 | 'read' => 'read', |
| 1446 | | 'delete_posts' => 'delete_' . $plural_base, |
| 1447 | 1446 | 'delete_private_posts' => 'delete_private_' . $plural_base, |
| 1448 | 1447 | 'delete_published_posts' => 'delete_published_' . $plural_base, |
| 1449 | 1448 | 'delete_others_posts' => 'delete_others_' . $plural_base, |