mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Docs: Improve formatting and syntax of the defaullt label docs in the DocBlock for get_post_type_labels()
.
See #32246. Built from https://develop.svn.wordpress.org/trunk@37886 git-svn-id: http://core.svn.wordpress.org/trunk@37827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
538eb01e6f
commit
0ef938e9da
@ -1413,42 +1413,47 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an object with all post type labels out of a post type object
|
||||
* Builds an object with all post type labels out of a post type object.
|
||||
*
|
||||
* Accepted keys of the label array in the post type object:
|
||||
*
|
||||
* - name - general name for the post type, usually plural. The same and overridden
|
||||
* by $post_type_object->label. Default is Posts/Pages
|
||||
* - singular_name - name for one object of this post type. Default is Post/Page
|
||||
* - add_new - Default is Add New for both hierarchical and non-hierarchical types.
|
||||
* When internationalizing this string, please use a gettext context
|
||||
* {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context}
|
||||
* matching your post type. Example: `_x( 'Add New', 'product' );`.
|
||||
* - add_new_item - Default is Add New Post/Add New Page.
|
||||
* - edit_item - Default is Edit Post/Edit Page.
|
||||
* - new_item - Default is New Post/New Page.
|
||||
* - view_item - Default is View Post/View Page.
|
||||
* - search_items - Default is Search Posts/Search Pages.
|
||||
* - not_found - Default is No posts found/No pages found.
|
||||
* - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash.
|
||||
* - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical
|
||||
* ones the default is 'Parent Page:'.
|
||||
* - all_items - String for the submenu. Default is All Posts/All Pages.
|
||||
* - archives - String for use with archives in nav menus. Default is Post Archives/Page Archives.
|
||||
* - insert_into_item - String for the media frame button. Default is Insert into post/Insert into page.
|
||||
* - uploaded_to_this_item - String for the media frame filter. Default is Uploaded to this post/Uploaded to this page.
|
||||
* - featured_image - Default is Featured Image.
|
||||
* - set_featured_image - Default is Set featured image.
|
||||
* - remove_featured_image - Default is Remove featured image.
|
||||
* - use_featured_image - Default is Use as featured image.
|
||||
* - menu_name - Default is the same as `name`.
|
||||
* - filter_items_list - String for the table views hidden heading.
|
||||
* - items_list_navigation - String for the table pagination hidden heading.
|
||||
* - items_list - String for the table hidden heading.
|
||||
* - `name` - General name for the post type, usually plural. The same and overridden
|
||||
* by `$post_type_object->label`. Default is 'Posts' / 'Pages'.
|
||||
* - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'.
|
||||
* - `add_new` - Default is 'Add New' for both hierarchical and non-hierarchical types.
|
||||
* When internationalizing this string, please use a {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context}
|
||||
* matching your post type. Example: `_x( 'Add New', 'product', 'textdomain' );`.
|
||||
* - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'.
|
||||
* - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'.
|
||||
* - `new_item` - Label for the new item page title. Default is 'New Post' / 'New Page'.
|
||||
* - `view_item` - Label for viewing a singular item. Default is 'View Post' / 'View Page'.
|
||||
* - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'.
|
||||
* - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'.
|
||||
* - `not_found_in_trash` - Label used when no items are in the trash. Default is 'No posts found in Trash' /
|
||||
* 'No pages found in Trash'.
|
||||
* - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical
|
||||
* post types. Default is 'Parent Page:'.
|
||||
* - `all_items` - Label to signify all items in a submenu link. Default is 'All Posts' / 'All Pages'.
|
||||
* - `archives` - Label for archives in nav menus. Default is 'Post Archives' / 'Page Archives'.
|
||||
* - `insert_into_item` - Label for the media frame button. Default is 'Insert into post' / 'Insert into page'.
|
||||
* - `uploaded_to_this_item` - Label for the media frame filter. Default is 'Uploaded to this post' /
|
||||
* 'Uploaded to this page'.
|
||||
* - `featured_image` - Label for the Featured Image meta box title. Default is 'Featured Image'.
|
||||
* - `set_featured_image` - Label for setting the featured image. Default is 'Set featured image'.
|
||||
* - `remove_featured_image` - Label for removing the featured image. Default is 'Remove featured image'.
|
||||
* - `use_featured_image` - Label in the media frame for using a featured image. Default is 'Use as featured image'.
|
||||
* - `menu_name` - Label for the menu name. Default is the same as `name`.
|
||||
* - `filter_items_list` - Label for the table views hidden heading. Default is 'Filter posts list' /
|
||||
* 'Filter pages list'.
|
||||
* - `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'.
|
||||
*
|
||||
* Above, the first default value is for non-hierarchical post types (like posts)
|
||||
* and the second one is for hierarchical post types (like pages).
|
||||
*
|
||||
* Note: To set labels used in post type admin notices, see the {@see 'post_updated_messages'} filter.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @since 4.3.0 Added the `featured_image`, `set_featured_image`, `remove_featured_image`,
|
||||
* and `use_featured_image` labels.
|
||||
@ -1458,7 +1463,7 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
||||
* @access private
|
||||
*
|
||||
* @param object $post_type_object Post type object.
|
||||
* @return object object with all the labels as member variables.
|
||||
* @return object Object with all the labels as member variables.
|
||||
*/
|
||||
function get_post_type_labels( $post_type_object ) {
|
||||
$nohier_vs_hier_defaults = array(
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37885';
|
||||
$wp_version = '4.6-alpha-37886';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user