Ticket #14832: posttype_menu_label.diff
File posttype_menu_label.diff, 2.3 KB (added by , 14 years ago) |
---|
-
wp-includes/post.php
945 945 function get_post_type_labels( $post_type_object ) { 946 946 $nohier_vs_hier_defaults = array( 947 947 'name' => array( _x('Posts', 'post type general name'), _x('Pages', 'post type general name') ), 948 'menu_name' => array( _x('Posts', 'post type menu name'), _x('Pages', 'post type menu name') ), 948 949 'singular_name' => array( _x('Post', 'post type singular name'), _x('Page', 'post type singular name') ), 949 950 'add_new' => array( _x('Add New', 'post'), _x('Add New', 'page') ), 950 951 'add_new_item' => array( __('Add New Post'), __('Add New Page') ), … … 968 969 969 970 if ( isset( $object->label ) && empty( $object->labels['name'] ) ) 970 971 $object->labels['name'] = $object->label; 972 973 if ( isset( $object->labels ) && empty( $object->labels['menu_name'] ) ) 974 $object->labels['menu_name'] = $object->labels['name']; 975 elseif ( isset( $object->label ) && empty( $object->labels['menu_name'] ) ) 976 $object->labels['menu_name'] = $object->labels['name']; 971 977 972 978 if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) 973 979 $object->labels['singular_name'] = $object->labels['name']; -
wp-admin/menu.php
122 122 while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) ) 123 123 $ptype_menu_position++; 124 124 125 $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels-> name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-posts-' . $ptype_for_id, $menu_icon );125 $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-posts-' . $ptype_for_id, $menu_icon ); 126 126 $submenu["edit.php?post_type=$ptype"][5] = array( $ptype_obj->labels->name, $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype"); 127 127 $submenu["edit.php?post_type=$ptype"][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" ); 128 128