Changeset 37886
- Timestamp:
- 06/28/2016 07:17:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r37885 r37886 1414 1414 1415 1415 /** 1416 * Build an object with all post type labels out of a post type object1416 * Builds an object with all post type labels out of a post type object. 1417 1417 * 1418 1418 * Accepted keys of the label array in the post type object: 1419 1419 * 1420 * - name - general name for the post type, usually plural. The same and overridden 1421 * by $post_type_object->label. Default is Posts/Pages 1422 * - singular_name - name for one object of this post type. Default is Post/Page 1423 * - add_new - Default is Add New for both hierarchical and non-hierarchical types. 1424 * When internationalizing this string, please use a gettext context 1425 * {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context} 1426 * matching your post type. Example: `_x( 'Add New', 'product' );`. 1427 * - add_new_item - Default is Add New Post/Add New Page. 1428 * - edit_item - Default is Edit Post/Edit Page. 1429 * - new_item - Default is New Post/New Page. 1430 * - view_item - Default is View Post/View Page. 1431 * - search_items - Default is Search Posts/Search Pages. 1432 * - not_found - Default is No posts found/No pages found. 1433 * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash. 1434 * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical 1435 * ones the default is 'Parent Page:'. 1436 * - all_items - String for the submenu. Default is All Posts/All Pages. 1437 * - archives - String for use with archives in nav menus. Default is Post Archives/Page Archives. 1438 * - insert_into_item - String for the media frame button. Default is Insert into post/Insert into page. 1439 * - uploaded_to_this_item - String for the media frame filter. Default is Uploaded to this post/Uploaded to this page. 1440 * - featured_image - Default is Featured Image. 1441 * - set_featured_image - Default is Set featured image. 1442 * - remove_featured_image - Default is Remove featured image. 1443 * - use_featured_image - Default is Use as featured image. 1444 * - menu_name - Default is the same as `name`. 1445 * - filter_items_list - String for the table views hidden heading. 1446 * - items_list_navigation - String for the table pagination hidden heading. 1447 * - items_list - String for the table hidden heading. 1420 * - `name` - General name for the post type, usually plural. The same and overridden 1421 * by `$post_type_object->label`. Default is 'Posts' / 'Pages'. 1422 * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'. 1423 * - `add_new` - Default is 'Add New' for both hierarchical and non-hierarchical types. 1424 * When internationalizing this string, please use a {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context} 1425 * matching your post type. Example: `_x( 'Add New', 'product', 'textdomain' );`. 1426 * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'. 1427 * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'. 1428 * - `new_item` - Label for the new item page title. Default is 'New Post' / 'New Page'. 1429 * - `view_item` - Label for viewing a singular item. Default is 'View Post' / 'View Page'. 1430 * - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'. 1431 * - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'. 1432 * - `not_found_in_trash` - Label used when no items are in the trash. Default is 'No posts found in Trash' / 1433 * 'No pages found in Trash'. 1434 * - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical 1435 * post types. Default is 'Parent Page:'. 1436 * - `all_items` - Label to signify all items in a submenu link. Default is 'All Posts' / 'All Pages'. 1437 * - `archives` - Label for archives in nav menus. Default is 'Post Archives' / 'Page Archives'. 1438 * - `insert_into_item` - Label for the media frame button. Default is 'Insert into post' / 'Insert into page'. 1439 * - `uploaded_to_this_item` - Label for the media frame filter. Default is 'Uploaded to this post' / 1440 * 'Uploaded to this page'. 1441 * - `featured_image` - Label for the Featured Image meta box title. Default is 'Featured Image'. 1442 * - `set_featured_image` - Label for setting the featured image. Default is 'Set featured image'. 1443 * - `remove_featured_image` - Label for removing the featured image. Default is 'Remove featured image'. 1444 * - `use_featured_image` - Label in the media frame for using a featured image. Default is 'Use as featured image'. 1445 * - `menu_name` - Label for the menu name. Default is the same as `name`. 1446 * - `filter_items_list` - Label for the table views hidden heading. Default is 'Filter posts list' / 1447 * 'Filter pages list'. 1448 * - `items_list_navigation` - Label for the table pagination hidden heading. Default is 'Posts list navigation' / 1449 * 'Pages list navigation'. 1450 * - `items_list` - Label for the table hidden heading. Default is 'Posts list' / 'Pages list'. 1448 1451 * 1449 1452 * Above, the first default value is for non-hierarchical post types (like posts) 1450 1453 * and the second one is for hierarchical post types (like pages). 1454 * 1455 * Note: To set labels used in post type admin notices, see the {@see 'post_updated_messages'} filter. 1451 1456 * 1452 1457 * @since 3.0.0 … … 1459 1464 * 1460 1465 * @param object $post_type_object Post type object. 1461 * @return object object with all the labels as member variables.1466 * @return object Object with all the labels as member variables. 1462 1467 */ 1463 1468 function get_post_type_labels( $post_type_object ) {
Note: See TracChangeset
for help on using the changeset viewer.