Changeset 59161
- Timestamp:
- 10/03/2024 10:44:30 PM (2 months ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r58419 r59161 435 435 <?php 436 436 if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) { 437 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';437 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new_item ) . '</a>'; 438 438 } 439 439 ?> -
trunk/src/wp-admin/edit.php
r58419 r59161 420 420 <?php 421 421 if ( current_user_can( $post_type_object->cap->create_posts ) ) { 422 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';422 echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new_item ) . '</a>'; 423 423 } 424 424 -
trunk/src/wp-admin/menu.php
r58278 r59161 170 170 $menu[ $ptype_menu_position ] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon ); 171 171 $submenu[ $ptype_file ][5] = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, $ptype_file ); 172 $submenu[ $ptype_file ][10] = array( $ptype_obj->labels->add_new , $ptype_obj->cap->create_posts, $post_new_file );172 $submenu[ $ptype_file ][10] = array( $ptype_obj->labels->add_new_item, $ptype_obj->cap->create_posts, $post_new_file ); 173 173 174 174 $i = 15; -
trunk/src/wp-includes/class-wp-post-type.php
r58211 r59161 974 974 'name' => array( _x( 'Posts', 'post type general name' ), _x( 'Pages', 'post type general name' ) ), 975 975 'singular_name' => array( _x( 'Post', 'post type singular name' ), _x( 'Page', 'post type singular name' ) ), 976 'add_new' => array( __( 'Add New Post' ), __( 'Add New Page' ) ),976 'add_new' => array( __( 'Add New' ), __( 'Add New' ) ), 977 977 'add_new_item' => array( __( 'Add New Post' ), __( 'Add New Page' ) ), 978 978 'edit_item' => array( __( 'Edit Post' ), __( 'Edit Page' ) ), -
trunk/src/wp-includes/post.php
r59050 r59161 2023 2023 * by `$post_type_object->label`. Default is 'Posts' / 'Pages'. 2024 2024 * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'. 2025 * - `add_new` - Label for adding a new item. Default is 'Add New Post' / 'Add New Page'.2025 * - `add_new` - Label for adding a new item. Default is 'Add New' / 'Add New'. 2026 2026 * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'. 2027 2027 * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'. … … 2085 2085 * This matches `add_new_item` and provides more context for better accessibility. 2086 2086 * @since 6.6.0 Added the `template_name` label. 2087 * @since 6.7.0 Restored pre-6.4.0 defaults for the `add_new` label and updated documentation. 2088 * Updated core usage to reference `add_new_item`. 2087 2089 * 2088 2090 * @access private
Note: See TracChangeset
for help on using the changeset viewer.