Make WordPress Core

Changeset 56519


Ignore:
Timestamp:
09/06/2023 12:44:29 AM (22 months ago)
Author:
SergeyBiryukov
Message:

Docs: Add a @since note for add_new labels change in get_post_type_labels().

Includes removing an obsolete recommendation to use a gettext context matching the post type for disambiguation, which would be redundant with the new labels, as they already include the type of content.

Follow-up [14571], [56515].

See #47125.

File:
1 edited

Legend:

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

    r56515 r56519  
    19321932 *          by `$post_type_object->label`. Default is 'Posts' / 'Pages'.
    19331933 * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'.
    1934  * - `add_new` - Default is 'Add New Type' for both hierarchical and non-hierarchical types.
    1935  *             When internationalizing this string, please use a {@link https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context gettext context}
    1936  *             matching your post type. Example: `__( 'Add New Product', 'textdomain' );`.
     1934 * - `add_new` - Label for adding a new item. Default is 'Add New Post' / 'Add New Page'.
    19371935 * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'.
    19381936 * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'.
     
    19931991 * @since 5.8.0 Added the `item_link` and `item_link_description` labels.
    19941992 * @since 6.3.0 Added the `item_trashed` label.
     1993 * @since 6.4.0 Changed default values for the `add_new` label to include the type of content.
     1994 *              This matches `add_new_item` and provides more context for better accessibility.
    19951995 *
    19961996 * @access private
Note: See TracChangeset for help on using the changeset viewer.