Ticket #16406: 16406.2.diff
File 16406.2.diff, 2.1 KB (added by , 13 years ago) |
---|
-
wp-includes/post.php
18 18 */ 19 19 function create_initial_post_types() { 20 20 register_post_type( 'post', array( 21 'labels' => array( 22 'name_admin_bar' => _x( 'Post', 'add new on admin bar' ), 23 ), 21 24 'public' => true, 22 25 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 23 26 '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ … … 30 33 ) ); 31 34 32 35 register_post_type( 'page', array( 36 'labels' => array( 37 'name_admin_bar' => _x( 'Page', 'add new on admin bar' ), 38 ), 33 39 'public' => true, 34 40 'publicly_queryable' => false, 35 41 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ … … 1194 1200 if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) 1195 1201 $object->labels['singular_name'] = $object->labels['name']; 1196 1202 1203 if ( ! isset( $object->labels['name_admin_bar'] ) ) 1204 $object->labels['name_admin_bar'] = isset( $object->labels['singular_name'] ) ? $object->labels['singular_name'] : $object->name; 1205 1197 1206 if ( !isset( $object->labels['menu_name'] ) && isset( $object->labels['name'] ) ) 1198 1207 $object->labels['menu_name'] = $object->labels['name']; 1199 1208 -
wp-includes/admin-bar.php
242 242 if ( true !== $ptype_obj->show_in_menu || ! current_user_can( $ptype_obj->cap->edit_posts ) ) 243 243 continue; 244 244 245 $actions[ 'post-new.php?post_type=' . $ptype_obj->name ] = array( $ptype_obj->labels-> singular_name, $ptype_obj->cap->edit_posts, 'new-' . $ptype_obj->name );245 $actions[ 'post-new.php?post_type=' . $ptype_obj->name ] = array( $ptype_obj->labels->name_admin_bar, $ptype_obj->cap->edit_posts, 'new-' . $ptype_obj->name ); 246 246 } 247 247 248 248 if ( current_user_can( 'upload_files' ) )