mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-27 11:38:01 +01:00
Posts, Post Types: Add labels for post transformation messages.
Because the existing `post_updated_messages` filter can be modified dynamically based on post state, it's unreliable to use with REST API clients. Instead, these new labels give clients stateless equivalents. Props earnjam. Fixes #45101. Built from https://develop.svn.wordpress.org/branches/5.0@43744 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
28310289bd
commit
883d237689
@ -1420,6 +1420,14 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
||||
* - `items_list_navigation` - Label for the table pagination hidden heading. Default is 'Posts list navigation' /
|
||||
* 'Pages list navigation'.
|
||||
* - `items_list` - Label for the table hidden heading. Default is 'Posts list' / 'Pages list'.
|
||||
* - `item_published` - Label used when an item is published. Default is 'Post published.' / 'Page published.'
|
||||
* - `item_published_privately` - Label used when an item is published with private visibility.
|
||||
* Default is 'Post published privately.' / 'Page published privately.'
|
||||
* - `item_reverted_to_draft` - Label used when an item is switched to a draft.
|
||||
* Default is 'Post reverted to draft.' / 'Page reverted to draft.'
|
||||
* - `item_scheduled` - Label used when an item is scheduled for publishing. Default is 'Post scheduled.' /
|
||||
* 'Page scheduled.'
|
||||
* - `item_updated` - Label used when an item is updated. Default is 'Post updated.' / 'Page updated.'
|
||||
*
|
||||
* Above, the first default value is for non-hierarchical post types (like posts)
|
||||
* and the second one is for hierarchical post types (like pages).
|
||||
@ -1433,6 +1441,8 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
||||
* `items_list_navigation`, and `items_list` labels.
|
||||
* @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
|
||||
* @since 4.7.0 Added the `view_items` and `attributes` labels.
|
||||
* @since 5.0.0 Added the `item_published`, `item_published_privately`, `item_reverted_to_draft`,
|
||||
* `item_scheduled`, and `item_updated` labels.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
@ -1465,6 +1475,11 @@ function get_post_type_labels( $post_type_object ) {
|
||||
'filter_items_list' => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ),
|
||||
'items_list_navigation' => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ),
|
||||
'items_list' => array( __( 'Posts list' ), __( 'Pages list' ) ),
|
||||
'item_published' => array( __( 'Post published.' ), __( 'Page published.' ) ),
|
||||
'item_published_privately' => array( __( 'Post published privately.' ), __( 'Page published privately.' ) ),
|
||||
'item_reverted_to_draft' => array( __( 'Post reverted to draft.' ), __( 'Page reverted to draft.' ) ),
|
||||
'item_scheduled' => array( __( 'Post scheduled.' ), __( 'Page scheduled.' ) ),
|
||||
'item_updated' => array( __( 'Post updated.' ), __( 'Page updated.' ) ),
|
||||
);
|
||||
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43743';
|
||||
$wp_version = '5.0-alpha-43744';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user