<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14571] trunk: I18n for custom post type labels.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14571">14571</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2010-05-11 19:52:50 +0000 (Tue, 11 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>I18n for custom post type labels. Props demetris, dimadin. Fixes <a href="http://trac.wordpress.org/ticket/12968">#12968</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminexportphp">trunk/wp-admin/export.php</a></li>
<li><a href="#trunkwpadminincludesnavmenuphp">trunk/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunkwpadminincludespostphp">trunk/wp-admin/includes/post.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminjsnavmenudevjs">trunk/wp-admin/js/nav-menu.dev.js</a></li>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpadminnavmenusphp">trunk/wp-admin/nav-menus.php</a></li>
<li><a href="#trunkwpadminpostnewphp">trunk/wp-admin/post-new.php</a></li>
<li><a href="#trunkwpadminpostphp">trunk/wp-admin/post.php</a></li>
<li><a href="#trunkwpincludesnavmenutemplatephp">trunk/wp-includes/nav-menu-template.php</a></li>
<li><a href="#trunkwpincludesnavmenuphp">trunk/wp-includes/nav-menu.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/edit.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -137,8 +137,6 @@
</span><span class="cx">          exit;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-$title = sprintf(__('Edit %s'), $post_type_object-&gt;label);
-
</del><span class="cx"> wp_enqueue_script('inline-edit-post');
</span><span class="cx"> 
</span><span class="cx"> $user_posts = false;
</span><span class="lines">@@ -165,7 +163,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;wrap&quot;&gt;
</span><span class="cx"> &lt;?php screen_icon(); ?&gt;
</span><del>-&lt;h2&gt;&lt;?php echo esc_html( $title ); ?&gt; &lt;a href=&quot;&lt;?php echo $post_new_file ?&gt;&quot; class=&quot;button add-new-h2&quot;&gt;&lt;?php echo esc_html_x('Add New', 'post'); ?&gt;&lt;/a&gt; &lt;?php
</del><ins>+&lt;h2&gt;&lt;?php echo esc_html( $post_type_object-&gt;labels-&gt;edit_item ); ?&gt; &lt;a href=&quot;&lt;?php echo $post_new_file ?&gt;&quot; class=&quot;button add-new-h2&quot;&gt;&lt;?php echo esc_html($post_type_object-&gt;labels-&gt;add_new); ?&gt;&lt;/a&gt; &lt;?php
</ins><span class="cx"> if ( isset($_GET['s']) &amp;&amp; $_GET['s'] )
</span><span class="cx">         printf( '&lt;span class=&quot;subtitle&quot;&gt;' . __('Search results for &amp;#8220;%s&amp;#8221;') . '&lt;/span&gt;', get_search_query() ); ?&gt;
</span><span class="cx"> &lt;/h2&gt;
</span><span class="lines">@@ -262,9 +260,9 @@
</span><span class="cx"> &lt;/ul&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><del>-        &lt;label class=&quot;screen-reader-text&quot; for=&quot;post-search-input&quot;&gt;&lt;?php printf( _x('Search %s', '%s: post type name'), $post_type_object-&gt;label ); ?&gt;:&lt;/label&gt;
</del><ins>+        &lt;label class=&quot;screen-reader-text&quot; for=&quot;post-search-input&quot;&gt;&lt;?php echo $post_type_object-&gt;labels-&gt;search_items; ?&gt;:&lt;/label&gt;
</ins><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;post-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php the_search_query(); ?&gt;&quot; /&gt;
</span><del>-        &lt;input type=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr( sprintf( _x('Search %s', '%s: post type name'), $post_type_object-&gt;label ) ); ?&gt;&quot; class=&quot;button&quot; /&gt;
</del><ins>+        &lt;input type=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr( $post_type_object-&gt;labels-&gt;search_items  ); ?&gt;&quot; class=&quot;button&quot; /&gt;
</ins><span class="cx"> &lt;/p&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;post_status&quot; class=&quot;post_status_page&quot; value=&quot;&lt;?php echo !empty($_GET['post_status']) ? esc_attr($_GET['post_status']) : 'all'; ?&gt;&quot; /&gt;
</span><span class="lines">@@ -410,9 +408,9 @@
</span><span class="cx"> &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;p&gt;&lt;?php
</span><span class="cx"> if ( isset($_GET['post_status']) &amp;&amp; 'trash' == $_GET['post_status'] )
</span><del>-        printf( __( 'No %s found in the Trash.' ), $post_type_object-&gt;label );
</del><ins>+        echo $post_type_object-&gt;labels-&gt;not_found_in_trash;
</ins><span class="cx"> else
</span><del>-        printf( __( 'No %s found.' ), $post_type_object-&gt;label );
</del><ins>+        echo $post_type_object-&gt;labels-&gt;not_found;
</ins><span class="cx"> ?&gt;&lt;/p&gt;
</span><span class="cx"> &lt;?php } ?&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminexportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/export.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/export.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/export.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> &lt;select name=&quot;post_type&quot; id=&quot;post_type&quot;&gt;
</span><span class="cx">         &lt;option value=&quot;all&quot; selected=&quot;selected&quot;&gt;&lt;?php _e('All Content'); ?&gt;&lt;/option&gt;
</span><span class="cx">         &lt;?php foreach ( get_post_types( array( 'public' =&gt; true, 'can_export' =&gt; true ), 'objects' ) as $post_type_obj ) { ?&gt;
</span><del>-                &lt;option value=&quot;&lt;?php echo $post_type_obj-&gt;name; ?&gt;&quot;&gt;&lt;?php echo $post_type_obj-&gt;label; ?&gt;&lt;/option&gt;
</del><ins>+                &lt;option value=&quot;&lt;?php echo $post_type_obj-&gt;name; ?&gt;&quot;&gt;&lt;?php echo $post_type_obj-&gt;labels-&gt;name; ?&gt;&lt;/option&gt;
</ins><span class="cx">         &lt;?php } ?&gt;
</span><span class="cx"> &lt;/select&gt;
</span><span class="cx"> &lt;/td&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/nav-menu.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/nav-menu.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/includes/nav-menu.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">                         $original_title = $original_object-&gt;post_title;
</span><span class="cx">                 }
</span><span class="cx">                 ?&gt;
</span><del>-                &lt;li id=&quot;menu-item-&lt;?php echo $item_id; ?&gt;&quot; class=&quot;menu-item menu-item-depth-&lt;?php echo $depth; ?&gt; menu-item-&lt;?php echo strtolower(esc_attr( $item-&gt;append )); ?&gt;&quot;&gt;
</del><ins>+                &lt;li id=&quot;menu-item-&lt;?php echo $item_id; ?&gt;&quot; class=&quot;menu-item menu-item-depth-&lt;?php echo $depth; ?&gt; menu-item-&lt;?php echo esc_attr( $item-&gt;object ); ?&gt;&quot;&gt;
</ins><span class="cx">                         &lt;dl class=&quot;menu-item-bar &lt;?php
</span><span class="cx">                                 if ( isset($_GET['edit-menu-item']) &amp;&amp; $item_id == $_GET['edit-menu-item'] )
</span><span class="cx">                                         echo 'menu-item-edit-active';
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">                                 &lt;dt class=&quot;menu-item-handle&quot;&gt;
</span><span class="cx">                                         &lt;span class=&quot;item-title&quot;&gt;&lt;?php echo esc_html( $item-&gt;title ); ?&gt;&lt;/span&gt;
</span><span class="cx">                                         &lt;span class=&quot;item-controls&quot;&gt;
</span><del>-                                                &lt;span class=&quot;item-type&quot;&gt;&lt;?php echo esc_html( $item-&gt;append ); ?&gt;&lt;/span&gt;
</del><ins>+                                                &lt;span class=&quot;item-type&quot;&gt;&lt;?php echo esc_html( $item-&gt;type_label ); ?&gt;&lt;/span&gt;
</ins><span class="cx">                                                 &lt;span class=&quot;item-order&quot;&gt;
</span><span class="cx">                                                         &lt;a href=&quot;&lt;?php
</span><span class="cx">                                                                 echo wp_nonce_url(
</span><span class="lines">@@ -161,10 +161,8 @@
</span><span class="cx"> 
</span><span class="cx">                                 &lt;div class=&quot;menu-item-actions description-wide submitbox&quot;&gt;
</span><span class="cx">                                         &lt;?php if( 'custom' != $item-&gt;type ) : ?&gt;
</span><del>-                                                &lt;p class=&quot;link-to-original&quot;&gt;&lt;?php
-                                                        _e('Original ');
-                                                        echo esc_html( $item-&gt;append );
-                                                        echo &quot;:&quot;; ?&gt;
</del><ins>+                                                &lt;p class=&quot;link-to-original&quot;&gt;
+                                                        &lt;?php _e('Original:'); ?&gt;
</ins><span class="cx">                                                         &lt;a href=&quot;&lt;?php echo esc_attr( $item-&gt;url ); ?&gt;&quot;&gt;
</span><span class="cx">                                                                 &lt;?php echo esc_html($original_title); ?&gt;
</span><span class="cx">                                                         &lt;/a&gt;
</span><span class="lines">@@ -184,7 +182,6 @@
</span><span class="cx">                                         &lt;input class=&quot;button-primary save-menu-item&quot; name=&quot;save_menu_item&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Save Menu Item'); ?&gt;&quot; /&gt;
</span><span class="cx">                                 &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                                &lt;input class=&quot;menu-item-data-append&quot; type=&quot;hidden&quot; name=&quot;menu-item-append[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo $item-&gt;append; ?&gt;&quot; /&gt;
</del><span class="cx">                                 &lt;input class=&quot;menu-item-data-db-id&quot; type=&quot;hidden&quot; name=&quot;menu-item-db-id[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo $item_id; ?&gt;&quot; /&gt;
</span><span class="cx">                                 &lt;input class=&quot;menu-item-data-object-id&quot; type=&quot;hidden&quot; name=&quot;menu-item-object-id[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;object_id ); ?&gt;&quot; /&gt;
</span><span class="cx">                                 &lt;input class=&quot;menu-item-data-object&quot; type=&quot;hidden&quot; name=&quot;menu-item-object[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;object ); ?&gt;&quot; /&gt;
</span><span class="lines">@@ -374,7 +371,7 @@
</span><span class="cx">                 $post_type = apply_filters( 'nav_menu_meta_box_object', $post_type );
</span><span class="cx">                 if ( $post_type ) {
</span><span class="cx">                         $id = $post_type-&gt;name;
</span><del>-                        add_meta_box( &quot;add-{$id}&quot;, $post_type-&gt;label, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', 'default', $post_type );
</del><ins>+                        add_meta_box( &quot;add-{$id}&quot;, $post_type-&gt;labels-&gt;name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', 'default', $post_type );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -544,7 +541,7 @@
</span><span class="cx">         ));
</span><span class="cx"> 
</span><span class="cx">         if ( !$posts )
</span><del>-                $error = '&lt;li id=&quot;error&quot;&gt;'. sprintf( __( 'No %s exists' ), $post_type['args']-&gt;label ) .'&lt;/li&gt;';
</del><ins>+                $error = '&lt;li id=&quot;error&quot;&gt;'. $post_type['args']-&gt;labels-&gt;not_found .'&lt;/li&gt;';
</ins><span class="cx"> 
</span><span class="cx">         $current_tab = 'all';
</span><span class="cx">         if ( isset( $_REQUEST[$post_type_name . '-tab'] ) &amp;&amp; in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) {
</span><span class="lines">@@ -865,7 +862,6 @@
</span><span class="cx">                                 'menu-item-parent-id' =&gt; ( isset( $_item_object_data['menu-item-parent-id'] ) ? $_item_object_data['menu-item-parent-id'] : '' ),
</span><span class="cx">                                 'menu-item-position' =&gt; ( isset( $_item_object_data['menu-item-position'] ) ? $_item_object_data['menu-item-position'] : '' ),
</span><span class="cx">                                 'menu-item-type' =&gt; ( isset( $_item_object_data['menu-item-type'] ) ? $_item_object_data['menu-item-type'] : '' ),
</span><del>-                                'menu-item-append' =&gt; ( isset( $_item_object_data['menu-item-append'] ) ? $_item_object_data['menu-item-append'] : '' ),
</del><span class="cx">                                 'menu-item-title' =&gt; ( isset( $_item_object_data['menu-item-title'] ) ? $_item_object_data['menu-item-title'] : '' ),
</span><span class="cx">                                 'menu-item-url' =&gt; ( isset( $_item_object_data['menu-item-url'] ) ? $_item_object_data['menu-item-url'] : '' ),
</span><span class="cx">                                 'menu-item-description' =&gt; ( isset( $_item_object_data['menu-item-description'] ) ? $_item_object_data['menu-item-description'] : '' ),
</span></span></pre></div>
<a id="trunkwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/includes/post.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -1079,14 +1079,8 @@
</span><span class="cx">         list($permalink, $post_name) = get_sample_permalink($post-&gt;ID, $new_title, $new_slug);
</span><span class="cx"> 
</span><span class="cx">         if ( 'publish' == $post-&gt;post_status ) {
</span><del>-                if ( 'post' == $post-&gt;post_type ) {
-                        $view_post = __('View Post');
-                } elseif ( 'page' == $post-&gt;post_type ) {
-                        $view_post = __('View Page');
-                } else {
-                        $ptype = get_post_type_object($post-&gt;post_type);
-                        $view_post = sprintf(__('View %s'), $ptype-&gt;singular_label);
-                }
</del><ins>+                $ptype = get_post_type_object($post-&gt;post_type);
+                $view_post = $ptype-&gt;labels-&gt;view_item;
</ins><span class="cx">                 $title = __('Click to edit this part of the permalink');
</span><span class="cx">         } else {
</span><span class="cx">                 $title = __('Temporary permalink. Click to edit this part.');
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/includes/template.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -13,9 +13,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7
</span><span class="cx">  *
</span><del>- * Outputs the HTML for the hidden table rows used in Categories, Link Categories and Tags quick edit.
</del><ins>+ * Outputs the HTML for the hidden table rows used in Categories, Link Caregories and Tags quick edit.
</ins><span class="cx">  *
</span><del>- * @param string $type &quot;edit-tags&quot;, &quot;categories&quot; or &quot;edit-link-categories&quot;
</del><ins>+ * @param string $type &quot;edit-tags&quot;, &quot;categoried&quot; or &quot;edit-link-categories&quot;
</ins><span class="cx">  * @param string $taxonomy The taxonomy of the row.
</span><span class="cx">  * @return
</span><span class="cx">  */
</span><span class="lines">@@ -1566,7 +1566,7 @@
</span><span class="cx">                 $attributes = 'class=&quot;post-title page-title column-title&quot;' . $style;
</span><span class="cx">                 $edit_link = get_edit_post_link( $page-&gt;ID );
</span><span class="cx">                 ?&gt;
</span><del>-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;strong&gt;&lt;?php if ( current_user_can($post_type_object-&gt;edit_cap, $page-&gt;ID) &amp;&amp; $post-&gt;post_status != 'trash' ) { ?&gt;&lt;a class=&quot;row-title&quot; href=&quot;&lt;?php echo $edit_link; ?&gt;&quot; title=&quot;&lt;?php echo esc_attr(sprintf(__('Edit &amp;#8220;%s&amp;#8221;'), $title)); ?&gt;&quot;&gt;&lt;?php echo $pad; echo $title ?&gt;&lt;/a&gt;&lt;?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . __('Parent Page: ') . esc_html($parent_name) : ''; ?&gt;&lt;/strong&gt;
</del><ins>+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;strong&gt;&lt;?php if ( current_user_can($post_type_object-&gt;edit_cap, $page-&gt;ID) &amp;&amp; $post-&gt;post_status != 'trash' ) { ?&gt;&lt;a class=&quot;row-title&quot; href=&quot;&lt;?php echo $edit_link; ?&gt;&quot; title=&quot;&lt;?php echo esc_attr(sprintf(__('Edit &amp;#8220;%s&amp;#8221;'), $title)); ?&gt;&quot;&gt;&lt;?php echo $pad; echo $title ?&gt;&lt;/a&gt;&lt;?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . $post_type_object-&gt;labels-&gt;parent . ' ' . esc_html($parent_name) : ''; ?&gt;&lt;/strong&gt;
</ins><span class="cx">                 &lt;?php
</span><span class="cx">                 $actions = array();
</span><span class="cx">                 if ( current_user_can($post_type_object-&gt;edit_cap, $page-&gt;ID) &amp;&amp; $post-&gt;post_status != 'trash' ) {
</span><span class="lines">@@ -3328,10 +3328,10 @@
</span><span class="cx">         if ( isset($post_type_object) ) {
</span><span class="cx">                 switch ( $screen-&gt;id ) {
</span><span class="cx">                         case $post_type_object-&gt;name:
</span><del>-                                $default_action = array('edit.php?post_type=' . $post_type_object-&gt;name =&gt; array(sprintf(__('Edit %s'), $post_type_object-&gt;label), $post_type_object-&gt;edit_type_cap));
</del><ins>+                                $default_action = array('edit.php?post_type=' . $post_type_object-&gt;name =&gt; array($post_type_object-&gt;labels-&gt;edit_item, $post_type_object-&gt;edit_type_cap));
</ins><span class="cx">                                 break;
</span><span class="cx">                         case &quot;edit-{$post_type_object-&gt;name}&quot;:
</span><del>-                                $default_action = array('post-new.php?post_type=' . $post_type_object-&gt;name =&gt; array(sprintf(__('New %s'), $post_type_object-&gt;singular_label), $post_type_object-&gt;edit_type_cap));
</del><ins>+                                $default_action = array('post-new.php?post_type=' . $post_type_object-&gt;name =&gt; array($post_type_object-&gt;labels-&gt;new_item, $post_type_object-&gt;edit_type_cap));
</ins><span class="cx">                                 break;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -3746,7 +3746,7 @@
</span><span class="cx">                         if ( isset($_GET['post_type']) &amp;&amp; in_array( $_GET['post_type'], get_post_types( array('public' =&gt; true ) ) ) )
</span><span class="cx">                                 $post_type = $_GET['post_type'];
</span><span class="cx">                         $post_type_object = get_post_type_object($post_type);
</span><del>-                        $per_page_label = $post_type_object-&gt;label;
</del><ins>+                        $per_page_label = $post_type_object-&gt;labels-&gt;name;
</ins><span class="cx">                         break;
</span><span class="cx">                 case 'ms-sites':
</span><span class="cx">                         $per_page_label = __('Sites');
</span></span></pre></div>
<a id="trunkwpadminjsnavmenudevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/nav-menu.dev.js (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/nav-menu.dev.js        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/js/nav-menu.dev.js        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -809,7 +809,6 @@
</span><span class="cx">                                 'menu-item-parent-id',
</span><span class="cx">                                 'menu-item-position',
</span><span class="cx">                                 'menu-item-type',
</span><del>-                                'menu-item-append',
</del><span class="cx">                                 'menu-item-title',
</span><span class="cx">                                 'menu-item-url',
</span><span class="cx">                                 'menu-item-description',
</span></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/menu.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -129,10 +129,9 @@
</span><span class="cx">         while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) )
</span><span class="cx">                 $ptype_menu_position++;
</span><span class="cx"> 
</span><del>-        $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj-&gt;label ), $ptype_obj-&gt;edit_type_cap, &quot;edit.php?post_type=$ptype&quot;, '', 'menu-top menu-icon-' . $ptype_class, 'menu-' . $ptype_class, $menu_icon );
-        $submenu[&quot;edit.php?post_type=$ptype&quot;][5]  = array( __('Edit'), $ptype_obj-&gt;edit_type_cap,  &quot;edit.php?post_type=$ptype&quot;);
-        /* translators: add new custom post type */
-        $submenu[&quot;edit.php?post_type=$ptype&quot;][10]  = array( _x('Add New', 'post'), $ptype_obj-&gt;edit_type_cap, &quot;post-new.php?post_type=$ptype&quot; );
</del><ins>+        $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj-&gt;labels-&gt;name ), $ptype_obj-&gt;edit_type_cap, &quot;edit.php?post_type=$ptype&quot;, '', 'menu-top menu-icon-' . $ptype_class, 'menu-' . $ptype_class, $menu_icon );
+        $submenu[&quot;edit.php?post_type=$ptype&quot;][5]  = array( $ptype_obj-&gt;labels-&gt;edit, $ptype_obj-&gt;edit_type_cap,  &quot;edit.php?post_type=$ptype&quot;);
+        $submenu[&quot;edit.php?post_type=$ptype&quot;][10]  = array( $ptype_obj-&gt;labels-&gt;add_new, $ptype_obj-&gt;edit_type_cap, &quot;post-new.php?post_type=$ptype&quot; );
</ins><span class="cx"> 
</span><span class="cx">         $i = 15;
</span><span class="cx">         foreach ( $wp_taxonomies as $tax ) {
</span></span></pre></div>
<a id="trunkwpadminnavmenusphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/nav-menus.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/nav-menus.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/nav-menus.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -299,7 +299,7 @@
</span><span class="cx"> 
</span><span class="cx">                         if ( ! is_wp_error( $_menu_object ) ) {
</span><span class="cx">                                 $menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' =&gt; 'ID', 'output' =&gt; ARRAY_A, 'output_key' =&gt; 'ID') );
</span><del>-                                $post_fields = array( 'menu-item-db-id', 'menu-item-object-id', 'menu-item-object', 'menu-item-parent-id', 'menu-item-position', 'menu-item-type', 'menu-item-append', 'menu-item-title', 'menu-item-url', 'menu-item-description', 'menu-item-attr-title', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn' );
</del><ins>+                                $post_fields = array( 'menu-item-db-id', 'menu-item-object-id', 'menu-item-object', 'menu-item-parent-id', 'menu-item-position', 'menu-item-type', 'menu-item-title', 'menu-item-url', 'menu-item-description', 'menu-item-attr-title', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn' );
</ins><span class="cx">                                 wp_defer_term_counting(true);
</span><span class="cx">                                 // Loop through all the menu items' POST variables
</span><span class="cx">                                 if ( ! empty( $_POST['menu-item-db-id'] ) ) {
</span></span></pre></div>
<a id="trunkwpadminpostnewphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/post-new.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/post-new.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/post-new.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> 
</span><span class="cx"> $post_type_object = get_post_type_object($post_type);
</span><span class="cx"> 
</span><del>-$title = sprintf(__('Add New %s'), $post_type_object-&gt;singular_label);
</del><ins>+$title = $post_type_object-&gt;labels-&gt;add_new_item;
</ins><span class="cx"> 
</span><span class="cx"> $editing = true;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminpostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/post.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/post.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-admin/post.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">                 wp_enqueue_script('autosave');
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        $title = sprintf(__('Edit %s'), $post_type_object-&gt;singular_label);
</del><ins>+        $title = $post_type_object-&gt;labels-&gt;edit_item;
</ins><span class="cx">         $post = get_post_to_edit($post_id);
</span><span class="cx"> 
</span><span class="cx">         if ( post_type_supports($post_type, 'comments') ) {
</span></span></pre></div>
<a id="trunkwpincludesnavmenutemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu-template.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu-template.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-includes/nav-menu-template.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -155,10 +155,8 @@
</span><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-object&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-object]&quot; value=&quot;'. esc_attr( $item-&gt;object ) .'&quot; /&gt;';
</span><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-parent-id&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-parent-id]&quot; value=&quot;'. esc_attr( $item-&gt;menu_item_parent ) .'&quot; /&gt;';
</span><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-type&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-type]&quot; value=&quot;'. esc_attr( $item-&gt;type ) .'&quot; /&gt;';
</span><del>-                $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-append&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-append]&quot; value=&quot;'. esc_attr( $item-&gt;append ) .'&quot; /&gt;';
</del><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-title&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-title]&quot; value=&quot;'. esc_attr( $item-&gt;title ) .'&quot; /&gt;';
</span><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-url&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-url]&quot; value=&quot;'. esc_attr( $item-&gt;url ) .'&quot; /&gt;';
</span><del>-                $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-append&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-append]&quot; value=&quot;'. esc_attr( $item-&gt;append ) .'&quot; /&gt;';
</del><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-target&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-target]&quot; value=&quot;'. esc_attr( $item-&gt;target ) .'&quot; /&gt;';
</span><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-attr_title&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-attr_title]&quot; value=&quot;'. esc_attr( $item-&gt;attr_title ) .'&quot; /&gt;';
</span><span class="cx">                 $output .= '&lt;input type=&quot;hidden&quot; class=&quot;menu-item-description&quot; name=&quot;menu-item[' . $possible_object_id . '][menu-item-description]&quot; value=&quot;'. esc_attr( $item-&gt;description ) .'&quot; /&gt;';
</span></span></pre></div>
<a id="trunkwpincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-includes/nav-menu.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -231,7 +231,6 @@
</span><span class="cx">                 'menu-item-parent-id' =&gt; 0,
</span><span class="cx">                 'menu-item-position' =&gt; 0,
</span><span class="cx">                 'menu-item-type' =&gt; 'custom',
</span><del>-                'menu-item-append' =&gt; 'custom',
</del><span class="cx">                 'menu-item-title' =&gt; '',
</span><span class="cx">                 'menu-item-url' =&gt; '',
</span><span class="cx">                 'menu-item-description' =&gt; '',
</span><span class="lines">@@ -277,11 +276,7 @@
</span><span class="cx">                         $original_title = $original_object-&gt;post_title;
</span><span class="cx"> 
</span><span class="cx">                         if ( 'trash' == get_post_status( $args['menu-item-object-id'] ) ) {
</span><del>-                                $post_type_object = get_post_type_object( $args['menu-item-object'] );
-                                if ( isset( $post_type_object-&gt;singular_label ) )
-                                        return new WP_Error('update_nav_menu_item_failed', sprintf(__('The menu item &quot;%1$s&quot; belongs to a %2$s that is in the trash, so it cannot be updated.'), $args['menu-item-title'], $post_type_object-&gt;singular_label ) );
-                                else
-                                        return new WP_Error('update_nav_menu_item_failed', sprintf(__('The menu item &quot;%1$s&quot; belongs to something that is in the trash, so it cannot be updated.'), $args['menu-item-title'] ) );
</del><ins>+                                return new WP_Error('update_nav_menu_item_failed', sprintf(__('The menu item &quot;%1$s&quot; belongs to something that is in the trash, so it cannot be updated.'), $args['menu-item-title'] ) );
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -485,7 +480,7 @@
</span><span class="cx">  * - object_id:                The DB ID of the original object this menu item represents, e.g. ID for posts and term_id for categories.
</span><span class="cx">  * - type:                The family of objects originally represented, such as &quot;post_type&quot; or &quot;taxonomy.&quot;
</span><span class="cx">  * - object:                The type of object originally represented, such as &quot;category,&quot; &quot;post&quot;, or &quot;attachment.&quot;
</span><del>- * - append:                The singular label used to describe this type of menu item.
</del><ins>+ * - type_label:        The singular label used to describe this type of menu item.
</ins><span class="cx">  * - post_parent:        The DB ID of the original object's parent object, if any (0 otherwise).
</span><span class="cx">  * - menu_item_parent:         The DB ID of the nav_menu_item that is this item's menu parent, if any.  0 otherwise.
</span><span class="cx">  * - url:                The URL to which this menu item points.
</span><span class="lines">@@ -512,7 +507,7 @@
</span><span class="cx"> 
</span><span class="cx">                         if ( 'post_type' == $menu_item-&gt;type ) {
</span><span class="cx">                                 $object = get_post_type_object( $menu_item-&gt;object );
</span><del>-                                $menu_item-&gt;append = $object-&gt;singular_label;
</del><ins>+                                $menu_item-&gt;type_label = $object-&gt;labels-&gt;singular_name;
</ins><span class="cx">                                 $menu_item-&gt;url = get_permalink( $menu_item-&gt;object_id );
</span><span class="cx"> 
</span><span class="cx">                                 $original_object = get_post( $menu_item-&gt;object_id );
</span><span class="lines">@@ -521,14 +516,14 @@
</span><span class="cx"> 
</span><span class="cx">                         } elseif ( 'taxonomy' == $menu_item-&gt;type ) {
</span><span class="cx">                                 $object = get_taxonomy( $menu_item-&gt;object );
</span><del>-                                $menu_item-&gt;append = $object-&gt;singular_label;
</del><ins>+                                $menu_item-&gt;type_label = $object-&gt;singular_label;
</ins><span class="cx">                                 $menu_item-&gt;url = get_term_link( (int) $menu_item-&gt;object_id, $menu_item-&gt;object );
</span><span class="cx"> 
</span><span class="cx">                                 $original_title = get_term_field( 'name', $menu_item-&gt;object_id, $menu_item-&gt;object, 'raw' );
</span><span class="cx">                                 $menu_item-&gt;title = '' == $menu_item-&gt;post_title ? $original_title : $menu_item-&gt;post_title;
</span><span class="cx"> 
</span><span class="cx">                         } else {
</span><del>-                                $menu_item-&gt;append = __('Custom');
</del><ins>+                                $menu_item-&gt;type_label = __('Custom');
</ins><span class="cx">                                 $menu_item-&gt;title = $menu_item-&gt;post_title;
</span><span class="cx">                                 $menu_item-&gt;url = get_post_meta( $menu_item-&gt;ID, '_menu_item_url', true );
</span><span class="cx">                         }
</span><span class="lines">@@ -548,7 +543,7 @@
</span><span class="cx"> 
</span><span class="cx">                         $object = get_post_type_object( $menu_item-&gt;post_type );
</span><span class="cx">                         $menu_item-&gt;object = $object-&gt;name;
</span><del>-                        $menu_item-&gt;append = strtolower( $object-&gt;singular_label );
</del><ins>+                        $menu_item-&gt;type_label = $object-&gt;labels-&gt;singular_name;
</ins><span class="cx"> 
</span><span class="cx">                         $menu_item-&gt;title = $menu_item-&gt;post_title;
</span><span class="cx">                         $menu_item-&gt;url = get_permalink( $menu_item-&gt;ID );
</span><span class="lines">@@ -569,7 +564,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $object = get_taxonomy( $menu_item-&gt;taxonomy );
</span><span class="cx">                 $menu_item-&gt;object = $object-&gt;name;
</span><del>-                $menu_item-&gt;append = strtolower( $object-&gt;singular_label );
</del><ins>+                $menu_item-&gt;type_label = $object-&gt;singular_label;
</ins><span class="cx"> 
</span><span class="cx">                 $menu_item-&gt;title = $menu_item-&gt;name;
</span><span class="cx">                 $menu_item-&gt;url = get_term_link( $menu_item, $menu_item-&gt;taxonomy );
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (14570 => 14571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2010-05-11 19:19:59 UTC (rev 14570)
+++ trunk/wp-includes/post.php        2010-05-11 19:52:50 UTC (rev 14571)
</span><span class="lines">@@ -16,8 +16,6 @@
</span><span class="cx">  */
</span><span class="cx"> function create_initial_post_types() {
</span><span class="cx">         register_post_type( 'post', array(
</span><del>-                'label' =&gt; __( 'Posts' ),
-                'singular_label' =&gt; __( 'Post' ),
</del><span class="cx">                 'public'  =&gt; true,
</span><span class="cx">                 'show_ui' =&gt; false,
</span><span class="cx">                 '_builtin' =&gt; true, /* internal use only. don't use this when registering your own post type. */
</span><span class="lines">@@ -30,8 +28,6 @@
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="cx">         register_post_type( 'page', array(
</span><del>-                'label' =&gt; __( 'Pages' ),
-                'singular_label' =&gt; __( 'Page' ),
</del><span class="cx">                 'public' =&gt; true,
</span><span class="cx">                 'show_ui' =&gt; false,
</span><span class="cx">                 '_builtin' =&gt; true, /* internal use only. don't use this when registering your own post type. */
</span><span class="lines">@@ -769,35 +765,33 @@
</span><span class="cx">  *
</span><span class="cx">  * Optional $args contents:
</span><span class="cx">  *
</span><del>- * label - A (plural) descriptive name for the post type marked for translation. Defaults to $post_type.
- * singular_label - A (singular) descriptive name for the post type marked for translation. Defaults to $label.
- * description - A short descriptive summary of what the post type is. Defaults to blank.
- * public - Whether posts of this type should be shown in the admin UI. Defaults to false.
- * exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true if the type is not public, false if the type is public.
- * publicly_queryable - Whether post_type queries can be performed from the front page.  Defaults to whatever public is set as.
- * show_ui - Whether to generate a default UI for managing this post type. Defaults to true if the type is public, false if the type is not public.
- * menu_position - The position in the menu order the post type should appear. Defaults to the bottom.
- * menu_icon - The url to the icon to be used for this menu. Defaults to use the posts icon.
- * inherit_type - The post type from which to inherit the edit link and capability type. Defaults to none.
- * capability_type - The post type to use for checking read, edit, and delete capabilities. Defaults to &quot;post&quot;.
- * edit_cap - The capability that controls editing a particular object of this post type. Defaults to &quot;edit_$capability_type&quot; (edit_post).
- * edit_type_cap - The capability that controls editing objects of this post type as a class. Defaults to &quot;edit_ . $capability_type . s&quot; (edit_posts).
- * edit_others_cap - The capability that controls editing objects of this post type that are owned by other users. Defaults to &quot;edit_others_ . $capability_type . s&quot; (edit_others_posts).
- * publish_others_cap - The capability that controls publishing objects of this post type. Defaults to &quot;publish_ . $capability_type . s&quot; (publish_posts).
- * read_cap - The capability that controls reading a particular object of this post type. Defaults to &quot;read_$capability_type&quot; (read_post).
- * delete_cap - The capability that controls deleting a particular object of this post type. Defaults to &quot;delete_$capability_type&quot; (delete_post).
- * hierarchical - Whether the post type is hierarchical. Defaults to false.
- * supports - An alias for calling add_post_type_support() directly. See add_post_type_support() for Documentation. Defaults to none.
- * register_meta_box_cb - Provide a callback function that will be called when setting up the meta boxes for the edit form.  Do remove_meta_box() and add_meta_box() calls in the callback.
- * taxonomies - An array of taxonomy identifiers that will be registered for the post type.  Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type().
- *
- * @package WordPress
- * @subpackage Post
</del><ins>+ * - description - A short descriptive summary of what the post type is. Defaults to blank.
+ * - public - Whether posts of this type should be shown in the admin UI. Defaults to false.
+ * - exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true if the type is not public, false if the type is public.
+ * - publicly_queryable - Whether post_type queries can be performed from the front page.  Defaults to whatever public is set as.
+ * - show_ui - Whether to generate a default UI for managing this post type. Defaults to true if the type is public, false if the type is not public.
+ * - menu_position - The position in the menu order the post type should appear. Defaults to the bottom.
+ * - menu_icon - The url to the icon to be used for this menu. Defaults to use the posts icon.
+ * - inherit_type - The post type from which to inherit the edit link and capability type. Defaults to none.
+ * - capability_type - The post type to use for checking read, edit, and delete capabilities. Defaults to &quot;post&quot;.
+ * - edit_cap - The capability that controls editing a particular object of this post type. Defaults to &quot;edit_$capability_type&quot; (edit_post).
+ * - edit_type_cap - The capability that controls editing objects of this post type as a class. Defaults to &quot;edit_ . $capability_type . s&quot; (edit_posts).
+ * - edit_others_cap - The capability that controls editing objects of this post type that are owned by other users. Defaults to &quot;edit_others_ . $capability_type . s&quot; (edit_others_posts).
+ * - publish_others_cap - The capability that controls publishing objects of this post type. Defaults to &quot;publish_ . $capability_type . s&quot; (publish_posts).
+ * - read_cap - The capability that controls reading a particular object of this post type. Defaults to &quot;read_$capability_type&quot; (read_post).
+ * - delete_cap - The capability that controls deleting a particular object of this post type. Defaults to &quot;delete_$capability_type&quot; (delete_post).
+ * - hierarchical - Whether the post type is hierarchical. Defaults to false.
+ * - supports - An alias for calling add_post_type_support() directly. See add_post_type_support() for Documentation. Defaults to none.
+ * - register_meta_box_cb - Provide a callback function that will be called when setting up the meta boxes for the edit form.  Do remove_meta_box() and add_meta_box() calls in the callback.
+ * - taxonomies - An array of taxonomy identifiers that will be registered for the post type.  Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type().
+ * - labels - An array of labels for this post type. You can see accepted values in {@link get_post_type_labels()}. By default post labels are used for non-hierarchical types and page labels for hierarchical ones.
+ * 
</ins><span class="cx">  * @since 2.9.0
</span><span class="cx">  * @uses $wp_post_types Inserts new post type object into the list
</span><span class="cx">  *
</span><span class="cx">  * @param string $post_type Name of the post type.
</span><span class="cx">  * @param array|string $args See above description.
</span><ins>+ * @return object the registered post type object
</ins><span class="cx">  */
</span><span class="cx"> function register_post_type($post_type, $args = array()) {
</span><span class="cx">         global $wp_post_types, $wp_rewrite, $wp;
</span><span class="lines">@@ -806,7 +800,13 @@
</span><span class="cx">                 $wp_post_types = array();
</span><span class="cx"> 
</span><span class="cx">         // Args prefixed with an underscore are reserved for internal use.
</span><del>-        $defaults = array('label' =&gt; false, 'singular_label' =&gt; false, 'description' =&gt; '', 'publicly_queryable' =&gt; null, 'exclude_from_search' =&gt; null, '_builtin' =&gt; false, '_edit_link' =&gt; 'post.php?post=%d', 'capability_type' =&gt; 'post', 'hierarchical' =&gt; false, 'public' =&gt; false, 'rewrite' =&gt; true, 'query_var' =&gt; true, 'supports' =&gt; array(), 'register_meta_box_cb' =&gt; null, 'taxonomies' =&gt; array(), 'show_ui' =&gt; null, 'menu_position' =&gt; null, 'menu_icon' =&gt; null, 'permalink_epmask' =&gt; EP_PERMALINK, 'can_export' =&gt; true );
</del><ins>+        $defaults = array(
+                'labels' =&gt; array(), 'description' =&gt; '', 'publicly_queryable' =&gt; null, 'exclude_from_search' =&gt; null,
+                '_builtin' =&gt; false, '_edit_link' =&gt; 'post.php?post=%d', 'capability_type' =&gt; 'post', 'hierarchical' =&gt; false,
+                'public' =&gt; false, 'rewrite' =&gt; true, 'query_var' =&gt; true, 'supports' =&gt; array(), 'register_meta_box_cb' =&gt; null,
+                'taxonomies' =&gt; array(), 'show_ui' =&gt; null, 'menu_position' =&gt; null, 'menu_icon' =&gt; null,
+                'permalink_epmask' =&gt; EP_PERMALINK, 'can_export' =&gt; true,
+        );
</ins><span class="cx">         $args = wp_parse_args($args, $defaults);
</span><span class="cx">         $args = (object) $args;
</span><span class="cx"> 
</span><span class="lines">@@ -825,12 +825,6 @@
</span><span class="cx">         if ( null === $args-&gt;exclude_from_search )
</span><span class="cx">                 $args-&gt;exclude_from_search = !$args-&gt;public;
</span><span class="cx"> 
</span><del>-        if ( false === $args-&gt;label )
-                $args-&gt;label = $post_type;
-
-        if ( false === $args-&gt;singular_label )
-                $args-&gt;singular_label = $args-&gt;label;
-
</del><span class="cx">         if ( empty($args-&gt;capability_type) )
</span><span class="cx">                 $args-&gt;capability_type = 'post';
</span><span class="cx">         if ( empty($args-&gt;edit_cap) )
</span><span class="lines">@@ -880,6 +874,13 @@
</span><span class="cx">         if ( $args-&gt;register_meta_box_cb )
</span><span class="cx">                 add_action('add_meta_boxes_' . $post_type, $args-&gt;register_meta_box_cb, 10, 1);
</span><span class="cx"> 
</span><ins>+        $args-&gt;labels = get_post_type_labels( $args );
+        
+        // we keep these two only for backwards compatibility
+        // TODO: remove in 3.1        
+        $args-&gt;label = $args-&gt;labels-&gt;name;
+        $args-&gt;singular_label = $args-&gt;labels-&gt;singular_name;
+
</ins><span class="cx">         $wp_post_types[$post_type] = $args;
</span><span class="cx"> 
</span><span class="cx">         add_action( 'future_' . $post_type, '_future_post_hook', 5, 2 );
</span><span class="lines">@@ -892,6 +893,61 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * 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. 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 http://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context} matching your post type. Example: &lt;code&gt;_x('Add New', 'product');&lt;/code&gt;
+ * - add_new_item - Default is Add New Post/Add New Page
+ * - edit_item - Default is Edit Post/Edit Page
+ * - edit - Default is Edit. When internationalizing this string, please use a {@link http://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context} matching your post type. Example: &lt;code&gt;_x('Edit', 'product');&lt;/code&gt;
+ * - 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 - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page:
+ * 
+ * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages.)
+ * 
+ * @since 3.0.0
+ * @param object $post_type_object
+ * @return object object with all the labels as member variables
+ */
+function get_post_type_labels( $post_type_object ) {
+        $nohier_vs_hier_defaults = array(
+                'name' =&gt; array( _x('Posts', 'post type general name'), _x('Pages', 'post type general name') ),
+                'singular_name' =&gt; array( _x('Post', 'post type singular name'), _x('Page', 'post type singular name') ),
+                'add_new' =&gt; array( _x('Add New', 'post'), _x('Add New', 'page') ),
+                'add_new_item' =&gt; array( __('Add New Post'), __('Add New Page') ),
+                'edit_item' =&gt; array( __('Edit Post'), __('Edit Page') ),
+                'edit' =&gt; array( _x('Edit', 'post'), _x('Edit', 'page') ),
+                'new_item' =&gt; array( __('New Post'), __('New Page') ),
+                'view_item' =&gt; array( __('View Post'), __('View Page') ),
+                'search_items' =&gt; array( __('Search Posts'), __('Search Pages') ),
+                'not_found' =&gt; array( __('No posts found'), __('No pages found') ),
+                'not_found_in_trash' =&gt; array( __('No posts found in Trash'), __('No pages found in Trash') ),
+                'view' =&gt; array( __('View Post'), __('View Page') ),
+                'parent' =&gt; array( null, __('Parent Page:') )
+        );
+        
+        // try to get missing (singular_)?name from older style (singular_)?label member variables
+        // we keep that for backwards compatibility
+        // TODO: remove in 3.1
+        if ( !isset( $post_type_object-&gt;labels['name'] ) &amp;&amp; isset( $post_type_object-&gt;label ) ) {
+                $post_type_object-&gt;labels['name'] = $post_type_object-&gt;label;
+        }
+        if ( !isset( $post_type_object-&gt;labels['singular_name'] ) &amp;&amp; isset( $post_type_object-&gt;singular_label ) ) {
+                $post_type_object-&gt;labels['singular_name'] = $post_type_object-&gt;singular_label;
+        }
+        
+        $defaults = array_map( create_function( '$x', $post_type_object-&gt;hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
+        $labels = array_merge( $defaults, $post_type_object-&gt;labels );
+        return (object)$labels;
+}
+
+/**
</ins><span class="cx">  * Register support of certain features for a post type.
</span><span class="cx">  *
</span><span class="cx">  * All features are directly associated with a functional area of the edit screen, such as the
</span></span></pre>
</div>
</div>

</body>
</html>