Make WordPress Core

Ticket #45101: 45101.2.diff

File 45101.2.diff, 2.7 KB (added by earnjam, 7 years ago)

Added documentation of new labels

  • src/wp-includes/post.php

    diff --git src/wp-includes/post.php src/wp-includes/post.php
    index 10f2129c53..2afe28bb96 100644
    function _post_type_meta_capabilities( $capabilities = null ) { 
    14201420 * - `items_list_navigation` - Label for the table pagination hidden heading. Default is 'Posts list navigation' /
    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)
    14251433 * and the second one is for hierarchical post types (like pages).
    function _post_type_meta_capabilities( $capabilities = null ) { 
    14331441 *              `items_list_navigation`, and `items_list` labels.
    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
    14381448 *
    function get_post_type_labels( $post_type_object ) { 
    14651475                'filter_items_list' => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ),
    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'];
    14701485