WordPress.org

Make WordPress Core

Changeset 43744


Ignore:
Timestamp:
10/18/2018 02:03:58 AM (13 months ago)
Author:
danielbachhuber
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/post.php

    r43729 r43744  
    14211421 *                           'Pages list navigation'.
    14221422 * - `items_list` - Label for the table hidden heading. Default is 'Posts list' / 'Pages list'.
     1423 * - `item_published` - Label used when an item is published. Default is 'Post published.' / 'Page published.'
     1424 * - `item_published_privately` - Label used when an item is published with private visibility.
     1425 *                              Default is 'Post published privately.' / 'Page published privately.'
     1426 * - `item_reverted_to_draft` - Label used when an item is switched to a draft.
     1427 *                            Default is 'Post reverted to draft.' / 'Page reverted to draft.'
     1428 * - `item_scheduled` - Label used when an item is scheduled for publishing. Default is 'Post scheduled.' /
     1429 *                    'Page scheduled.'
     1430 * - `item_updated` - Label used when an item is updated. Default is 'Post updated.' / 'Page updated.'
    14231431 *
    14241432 * Above, the first default value is for non-hierarchical post types (like posts)
     
    14341442 * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
    14351443 * @since 4.7.0 Added the `view_items` and `attributes` labels.
     1444 * @since 5.0.0 Added the `item_published`, `item_published_privately`, `item_reverted_to_draft`,
     1445 *              `item_scheduled`, and `item_updated` labels.
    14361446 *
    14371447 * @access private
     
    14661476        'items_list_navigation' => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ),
    14671477        'items_list' => array( __( 'Posts list' ), __( 'Pages list' ) ),
     1478        'item_published' => array( __( 'Post published.' ), __( 'Page published.' ) ),
     1479        'item_published_privately' => array( __( 'Post published privately.' ), __( 'Page published privately.' ) ),
     1480        'item_reverted_to_draft' => array( __( 'Post reverted to draft.' ), __( 'Page reverted to draft.' ) ),
     1481        'item_scheduled' => array( __( 'Post scheduled.' ), __( 'Page scheduled.' ) ),
     1482        'item_updated' => array( __( 'Post updated.' ), __( 'Page updated.' ) ),
    14681483    );
    14691484    $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
Note: See TracChangeset for help on using the changeset viewer.