<!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>[14614] trunk: I18n for custom taxonomies.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14614">14614</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2010-05-14 00:34:04 +0000 (Fri, 14 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>I18n for custom taxonomies. Fixes <a href="http://trac.wordpress.org/ticket/13357">#13357</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadmineditformadvancedphp">trunk/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunkwpadminedittagformphp">trunk/wp-admin/edit-tag-form.php</a></li>
<li><a href="#trunkwpadminedittagsphp">trunk/wp-admin/edit-tags.php</a></li>
<li><a href="#trunkwpadminexportphp">trunk/wp-admin/export.php</a></li>
<li><a href="#trunkwpadminincludesmetaboxesphp">trunk/wp-admin/includes/meta-boxes.php</a></li>
<li><a href="#trunkwpadminincludesnavmenuphp">trunk/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpadminpressthisphp">trunk/wp-admin/press-this.php</a></li>
<li><a href="#trunkwpincludesdefaultwidgetsphp">trunk/wp-includes/default-widgets.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-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>
<li><a href="#trunkwpincludestaxonomyphp">trunk/wp-includes/taxonomy.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/admin-ajax.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -281,7 +281,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         ob_start();
</span><del>-                wp_dropdown_categories( array( 'taxonomy' =&gt; $taxonomy-&gt;name, 'hide_empty' =&gt; 0, 'name' =&gt; 'new'.$taxonomy-&gt;name.'_parent', 'orderby' =&gt; 'name', 'hierarchical' =&gt; 1, 'show_option_none' =&gt; sprintf( __('&amp;mdash; Parent %s &amp;mdash;'), $taxonomy-&gt;singular_label ) ) );
</del><ins>+                wp_dropdown_categories( array(
+                        'taxonomy' =&gt; $taxonomy-&gt;name, 'hide_empty' =&gt; 0, 'name' =&gt; 'new'.$taxonomy-&gt;name.'_parent', 'orderby' =&gt; 'name',
+                        'hierarchical' =&gt; 1, 'show_option_none' =&gt; '&amp;mdash; '.$taxonomy-&gt;labels-&gt;parent_item.' &amp;mdash;'
+                ) );
</ins><span class="cx">         $sup = ob_get_contents();
</span><span class="cx">         ob_end_clean();
</span><span class="cx">         $add['supplemental'] = array( 'newcat_parent' =&gt; $sup );
</span></span></pre></div>
<a id="trunkwpadmineditformadvancedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-form-advanced.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-form-advanced.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/edit-form-advanced.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx">         if ( ! $taxonomy-&gt;show_ui )
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><del>-        $label = isset($taxonomy-&gt;label) ? esc_attr($taxonomy-&gt;label) : $tax_name;
</del><ins>+        $label = $taxonomy-&gt;labels-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">         if ( !is_taxonomy_hierarchical($tax_name) )
</span><span class="cx">                 add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core');
</span></span></pre></div>
<a id="trunkwpadminedittagformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tag-form.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tag-form.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/edit-tag-form.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -24,7 +24,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 printf(_x('Edit %s', '%s: singular taxonomy name'), $tax-&gt;singular_label); ?&gt;&lt;/h2&gt;
</del><ins>+&lt;h2&gt;&lt;?php echo $tax-&gt;labels-&gt;edit_item; ?&gt;&lt;/h2&gt;
</ins><span class="cx"> &lt;div id=&quot;ajax-response&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;form name=&quot;edittag&quot; id=&quot;edittag&quot; method=&quot;post&quot; action=&quot;edit-tags.php&quot; class=&quot;validate&quot;&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;editedtag&quot; /&gt;
</span><span class="lines">@@ -75,6 +75,6 @@
</span><span class="cx">         do_action('edit_tag_form', $tag);
</span><span class="cx"> do_action($taxonomy . '_edit_form', $tag, $taxonomy);
</span><span class="cx"> ?&gt;
</span><del>-&lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; name=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr( sprintf(_x('Update %s', '%s: singular taxonomy name'), $tax-&gt;singular_label)); ?&gt;&quot; /&gt;&lt;/p&gt;
</del><ins>+&lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button-primary&quot; name=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr( __( 'Update' ) ); ?&gt;&quot; /&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;/form&gt;
</span><span class="cx"> &lt;/div&gt;
</span></span></pre></div>
<a id="trunkwpadminedittagsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tags.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tags.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/edit-tags.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> 
</span><span class="cx"> $tax = get_taxonomy($taxonomy);
</span><span class="cx"> 
</span><del>-$title = $tax-&gt;label;
</del><ins>+$title = $tax-&gt;labels-&gt;name;
</ins><span class="cx"> 
</span><span class="cx"> if ( empty($post_type) || !in_array( $post_type, get_post_types( array('public' =&gt; true) ) ) )
</span><span class="cx">         $post_type = 'post';
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> break;
</span><span class="cx"> 
</span><span class="cx"> case 'edit':
</span><del>-        $title = sprintf(_x('Edit %s', '%s: singular taxonomy name'), $tax-&gt;singular_label);
</del><ins>+        $title = $tax-&gt;labels-&gt;edit_item;
</ins><span class="cx"> 
</span><span class="cx">         require_once ('admin-header.php');
</span><span class="cx">         $tag_ID = (int) $_GET['tag_ID'];
</span><span class="lines">@@ -192,9 +192,9 @@
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;taxonomy&quot; value=&quot;&lt;?php echo esc_attr($taxonomy); ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;&lt;?php echo esc_attr($post_type); ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><del>-        &lt;label class=&quot;screen-reader-text&quot; for=&quot;tag-search-input&quot;&gt;&lt;?php printf(_x('Search %s', '%s: plural taxonomy name'), $tax-&gt;label); ?&gt;:&lt;/label&gt;
</del><ins>+        &lt;label class=&quot;screen-reader-text&quot; for=&quot;tag-search-input&quot;&gt;&lt;?php echo $tax-&gt;labels-&gt;search_items; ?&gt;:&lt;/label&gt;
</ins><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;tag-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php _admin_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: plural taxonomy name'), $tax-&gt;label) ); ?&gt;&quot; class=&quot;button&quot; /&gt;
</del><ins>+        &lt;input type=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;labels-&gt;search_items );  ?&gt;&quot; class=&quot;button&quot; /&gt;
</ins><span class="cx"> &lt;/p&gt;
</span><span class="cx"> &lt;/form&gt;
</span><span class="cx"> &lt;br class=&quot;clear&quot; /&gt;
</span><span class="lines">@@ -326,7 +326,7 @@
</span><span class="cx"> if ( $tag_cloud ) :
</span><span class="cx"> ?&gt;
</span><span class="cx"> &lt;div class=&quot;tagcloud&quot;&gt;
</span><del>-&lt;h3&gt;&lt;?php printf(_x('Popular %s', '%s: plural taxonomy name'), $tax-&gt;label); ?&gt;&lt;/h3&gt;
</del><ins>+&lt;h3&gt;&lt;?php echo $tax-&gt;labels-&gt;popular_items; ?&gt;&lt;/h3&gt;
</ins><span class="cx"> &lt;?php echo $tag_cloud; unset( $tag_cloud ); ?&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;?php
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;form-wrap&quot;&gt;
</span><del>-&lt;h3&gt;&lt;?php printf(_x('Add a New %s', '%s: singular taxonomy name'), $tax-&gt;singular_label); ?&gt;&lt;/h3&gt;
</del><ins>+&lt;h3&gt;&lt;?php echo $tax-&gt;labels-&gt;add_new_item; ?&gt;&lt;/h3&gt;
</ins><span class="cx"> &lt;form id=&quot;addtag&quot; method=&quot;post&quot; action=&quot;edit-tags.php&quot; class=&quot;validate&quot;&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;add-tag&quot; /&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;taxonomy&quot; value=&quot;&lt;?php echo esc_attr($taxonomy); ?&gt;&quot; /&gt;
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx">         do_action('add_tag_form_fields', $taxonomy);
</span><span class="cx"> do_action($taxonomy . '_add_form_fields', $taxonomy);
</span><span class="cx"> ?&gt;
</span><del>-&lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submit&quot; id=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr(sprintf(_x('Add %s', '%s: singular  taxonomy name'), $tax-&gt;singular_label)); ?&gt;&quot; /&gt;&lt;/p&gt;
</del><ins>+&lt;p class=&quot;submit&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submit&quot; id=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;labels-&gt;add_new_item ); ?&gt;&quot; /&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;?php
</span><span class="cx"> if ( 'category' == $taxonomy )
</span><span class="cx">         do_action('edit_category_form',        (object)array('parent' =&gt; 0) );  // Back compat hook. Deprecated in preference to $taxonomy_add_form
</span></span></pre></div>
<a id="trunkwpadminexportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/export.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/export.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/export.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> &lt;?php foreach ( get_taxonomies( array( 'show_ui' =&gt; true ), 'objects' ) as $tax_obj ) {
</span><span class="cx">         $term_dropdown = wp_dropdown_categories( array( 'taxonomy' =&gt; $tax_obj-&gt;name, 'hide_if_empty' =&gt; true, 'show_option_all' =&gt; __( 'All Terms' ), 'name' =&gt; 'taxonomy[' . $tax_obj-&gt;name . ']', 'id' =&gt; 'taxonomy-' . $tax_obj-&gt;name, 'class' =&gt; '', 'echo' =&gt; false ) );
</span><span class="cx">         if ( $term_dropdown )
</span><del>-                echo '&lt;label for=&quot;taxonomy-' . $tax_obj-&gt;name . '&quot;&gt;' . $tax_obj-&gt;label . '&lt;/label&gt;: ' . $term_dropdown . '&lt;br/&gt;';
</del><ins>+                echo '&lt;label for=&quot;taxonomy-' . $tax_obj-&gt;name . '&quot;&gt;' . $tax_obj-&gt;labels-&gt;name . '&lt;/label&gt;: ' . $term_dropdown . '&lt;br/&gt;';
</ins><span class="cx"> }
</span><span class="cx"> ?&gt;
</span><span class="cx"> &lt;/td&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/includes/meta-boxes.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx">         ?&gt;
</span><span class="cx">         &lt;div id=&quot;taxonomy-&lt;?php echo $taxonomy; ?&gt;&quot; class=&quot;categorydiv&quot;&gt;
</span><span class="cx">                 &lt;ul id=&quot;&lt;?php echo $taxonomy; ?&gt;-tabs&quot; class=&quot;category-tabs&quot;&gt;
</span><del>-                        &lt;li class=&quot;tabs&quot;&gt;&lt;a href=&quot;#&lt;?php echo $taxonomy; ?&gt;-all&quot; tabindex=&quot;3&quot;&gt;&lt;?php printf( __( 'All %s' ), $tax-&gt;label ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                        &lt;li class=&quot;tabs&quot;&gt;&lt;a href=&quot;#&lt;?php echo $taxonomy; ?&gt;-all&quot; tabindex=&quot;3&quot;&gt;&lt;?php echo $tax-&gt;labels-&gt;all_items; ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx">                         &lt;li class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#&lt;?php echo $taxonomy; ?&gt;-pop&quot; tabindex=&quot;3&quot;&gt;&lt;?php _e( 'Most Used' ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</span><span class="cx">                 &lt;/ul&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -320,11 +320,22 @@
</span><span class="cx">         &lt;?php endif; ?&gt;
</span><span class="cx">         &lt;?php if ( current_user_can($tax-&gt;cap-&gt;edit_terms) ) : ?&gt;
</span><span class="cx">                         &lt;div id=&quot;&lt;?php echo $taxonomy; ?&gt;-adder&quot; class=&quot;wp-hidden-children&quot;&gt;
</span><del>-                                &lt;h4&gt;&lt;a id=&quot;&lt;?php echo $taxonomy; ?&gt;-add-toggle&quot; href=&quot;#&lt;?php echo $taxonomy; ?&gt;-add&quot; class=&quot;hide-if-no-js&quot; tabindex=&quot;3&quot;&gt;&lt;?php printf( __( '+ Add New %s' ), $tax-&gt;singular_label ); ?&gt;&lt;/a&gt;&lt;/h4&gt;
</del><ins>+                                &lt;h4&gt;
+                                        &lt;a id=&quot;&lt;?php echo $taxonomy; ?&gt;-add-toggle&quot; href=&quot;#&lt;?php echo $taxonomy; ?&gt;-add&quot; class=&quot;hide-if-no-js&quot; tabindex=&quot;3&quot;&gt;
+                                                &lt;?php
+                                                        /* translators: %s: add new taxonomy label */
+                                                        printf( __( '+ %s' ), $tax-&gt;labels-&gt;add_new_item );
+                                                ?&gt;
+                                        &lt;/a&gt;
+                                &lt;/h4&gt;
</ins><span class="cx">                                 &lt;p id=&quot;&lt;?php echo $taxonomy; ?&gt;-add&quot; class=&quot;category-add wp-hidden-child&quot;&gt;
</span><del>-                                        &lt;label class=&quot;screen-reader-text&quot; for=&quot;new&lt;?php echo $taxonomy; ?&gt;&quot;&gt;&lt;?php printf( __( 'Add New %s' ), $tax-&gt;singular_label ); ?&gt;&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;new&lt;?php echo $taxonomy; ?&gt;&quot; id=&quot;new&lt;?php echo $taxonomy; ?&gt;&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&lt;?php echo esc_attr( sprintf( 'New %s Name', $tax-&gt;singular_label ) ); ?&gt;&quot; tabindex=&quot;3&quot; aria-required=&quot;true&quot;/&gt;
-                                        &lt;label class=&quot;screen-reader-text&quot; for=&quot;new&lt;?php echo $taxonomy; ?&gt;_parent&quot;&gt;&lt;?php printf( __('Parent %s'), $tax-&gt;singular_label ); ?&gt;:&lt;/label&gt;&lt;?php wp_dropdown_categories( array( 'taxonomy' =&gt; $taxonomy, 'hide_empty' =&gt; 0, 'name' =&gt; 'new'.$taxonomy.'_parent', 'orderby' =&gt; 'name', 'hierarchical' =&gt; 1, 'show_option_none' =&gt; sprintf( __('&amp;mdash; Parent %s &amp;mdash;'), $tax-&gt;singular_label ), 'tab_index' =&gt; 3 ) ); ?&gt;
-                                        &lt;input type=&quot;button&quot; id=&quot;&lt;?php echo $taxonomy; ?&gt;-add-submit&quot; class=&quot;add:&lt;?php echo $taxonomy ?&gt;checklist:&lt;?php echo $taxonomy ?&gt;-add button category-add-sumbit&quot; value=&quot;&lt;?php esc_attr_e( 'Add' ); ?&gt;&quot; tabindex=&quot;3&quot; /&gt;
</del><ins>+                                        &lt;label class=&quot;screen-reader-text&quot; for=&quot;new&lt;?php echo $taxonomy; ?&gt;&quot;&gt;&lt;?php echo $tax-&gt;labels-&gt;add_new_item; ?&gt;&lt;/label&gt;
+                                        &lt;input type=&quot;text&quot; name=&quot;new&lt;?php echo $taxonomy; ?&gt;&quot; id=&quot;new&lt;?php echo $taxonomy; ?&gt;&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;labels-&gt;new_item_name ); ?&gt;&quot; tabindex=&quot;3&quot; aria-required=&quot;true&quot;/&gt;
+                                        &lt;label class=&quot;screen-reader-text&quot; for=&quot;new&lt;?php echo $taxonomy; ?&gt;_parent&quot;&gt;
+                                                &lt;?php echo $tax-&gt;labels-&gt;parent_item_colon; ?&gt;
+                                        &lt;/label&gt;
+                                        &lt;?php wp_dropdown_categories( array( 'taxonomy' =&gt; $taxonomy, 'hide_empty' =&gt; 0, 'name' =&gt; 'new'.$taxonomy.'_parent', 'orderby' =&gt; 'name', 'hierarchical' =&gt; 1, 'show_option_none' =&gt; '&amp;mdash; ' . $tax-&gt;labels-&gt;parent_item . ' &amp;mdash;', 'tab_index' =&gt; 3 ) ); ?&gt;
+                                        &lt;input type=&quot;button&quot; id=&quot;&lt;?php echo $taxonomy; ?&gt;-add-submit&quot; class=&quot;add:&lt;?php echo $taxonomy ?&gt;checklist:&lt;?php echo $taxonomy ?&gt;-add button category-add-sumbit&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;labels-&gt;add_new_item ); ?&gt;&quot; tabindex=&quot;3&quot; /&gt;
</ins><span class="cx">                                         &lt;?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce', false ); ?&gt;
</span><span class="cx">                                         &lt;span id=&quot;&lt;?php echo $taxonomy; ?&gt;-ajax-response&quot;&gt;&lt;/span&gt;
</span><span class="cx">                                 &lt;/p&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/nav-menu.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/nav-menu.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/includes/nav-menu.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -391,7 +391,7 @@
</span><span class="cx">                 $tax = apply_filters( 'nav_menu_meta_box_object', $tax );
</span><span class="cx">                 if ( $tax ) {
</span><span class="cx">                         $id = $tax-&gt;name;
</span><del>-                        add_meta_box( &quot;add-{$id}&quot;, $tax-&gt;label, 'wp_nav_menu_item_taxonomy_meta_box', 'nav-menus', 'side', 'default', $tax );
</del><ins>+                        add_meta_box( &quot;add-{$id}&quot;, $tax-&gt;labels-&gt;name, 'wp_nav_menu_item_taxonomy_meta_box', 'nav-menus', 'side', 'default', $tax );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/includes/template.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> 
</span><span class="cx">         &lt;p class=&quot;inline-edit-save submit&quot;&gt;
</span><span class="cx">                 &lt;a accesskey=&quot;c&quot; href=&quot;#inline-edit&quot; title=&quot;&lt;?php _e('Cancel'); ?&gt;&quot; class=&quot;cancel button-secondary alignleft&quot;&gt;&lt;?php _e('Cancel'); ?&gt;&lt;/a&gt;
</span><del>-                &lt;?php $update_text = sprintf( __('Update %s'), $tax-&gt;singular_label ); ?&gt;
</del><ins>+                &lt;?php $update_text = $tax-&gt;labels-&gt;update_item; ?&gt;
</ins><span class="cx">                 &lt;a accesskey=&quot;s&quot; href=&quot;#inline-edit&quot; title=&quot;&lt;?php echo esc_attr( $update_text ); ?&gt;&quot; class=&quot;save button-primary alignright&quot;&gt;&lt;?php echo $update_text; ?&gt;&lt;/a&gt;
</span><span class="cx">                 &lt;img class=&quot;waiting&quot; style=&quot;display:none;&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
</span><span class="cx">                 &lt;span class=&quot;error&quot; style=&quot;display:none;&quot;&gt;&lt;/span&gt;
</span><span class="lines">@@ -976,7 +976,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?&gt;
</span><span class="cx"> 
</span><del>-                &lt;span class=&quot;title inline-edit-categories-label&quot;&gt;&lt;?php echo esc_html($taxonomy-&gt;label) ?&gt;
</del><ins>+                &lt;span class=&quot;title inline-edit-categories-label&quot;&gt;&lt;?php echo esc_html($taxonomy-&gt;labels-&gt;name) ?&gt;
</ins><span class="cx">                         &lt;span class=&quot;catshow&quot;&gt;&lt;?php _e('[more]'); ?&gt;&lt;/span&gt;
</span><span class="cx">                         &lt;span class=&quot;cathide&quot; style=&quot;display:none;&quot;&gt;&lt;?php _e('[less]'); ?&gt;&lt;/span&gt;
</span><span class="cx">                 &lt;/span&gt;
</span><span class="lines">@@ -1040,7 +1040,7 @@
</span><span class="cx"> &lt;?php foreach ( $flat_taxonomies as $taxonomy ) : ?&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;label class=&quot;inline-edit-tags&quot;&gt;
</span><del>-                        &lt;span class=&quot;title&quot;&gt;&lt;?php echo esc_html($taxonomy-&gt;label) ?&gt;&lt;/span&gt;
</del><ins>+                        &lt;span class=&quot;title&quot;&gt;&lt;?php echo esc_html($taxonomy-&gt;labels-&gt;name) ?&gt;&lt;/span&gt;
</ins><span class="cx">                         &lt;textarea cols=&quot;22&quot; rows=&quot;1&quot; name=&quot;tax_input[&lt;?php echo esc_attr($taxonomy-&gt;name)?&gt;]&quot; class=&quot;tax_input_&lt;?php echo esc_attr($taxonomy-&gt;name)?&gt;&quot;&gt;&lt;/textarea&gt;
</span><span class="cx">                 &lt;/label&gt;
</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;cap-&gt;edit_post, $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;
</del><ins>+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;strong&gt;&lt;?php if ( current_user_can($post_type_object-&gt;cap-&gt;edit_post, $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_item_colon . ' ' . 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;cap-&gt;edit_post, $page-&gt;ID) &amp;&amp; $post-&gt;post_status != 'trash' ) {
</span><span class="lines">@@ -3762,7 +3762,7 @@
</span><span class="cx">                         break;
</span><span class="cx">                 case 'edit-tags':
</span><span class="cx">                         global $tax;
</span><del>-                        $per_page_label = $tax-&gt;label;
</del><ins>+                        $per_page_label = $tax-&gt;labels-&gt;name;
</ins><span class="cx">                         break;
</span><span class="cx">                 case 'plugins':
</span><span class="cx">                         $per_page_label = __('Plugins');
</span></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/menu.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">                 if ( ! $tax-&gt;show_ui || ! in_array('post', (array) $tax-&gt;object_type, true) )
</span><span class="cx">                         continue;
</span><span class="cx"> 
</span><del>-                $submenu['edit.php'][$i++] = array( esc_attr($tax-&gt;label), $tax-&gt;cap-&gt;manage_terms, 'edit-tags.php?taxonomy=' . $tax-&gt;name );
</del><ins>+                $submenu['edit.php'][$i++] = array( esc_attr( $tax-&gt;labels-&gt;name ), $tax-&gt;cap-&gt;manage_terms, 'edit-tags.php?taxonomy=' . $tax-&gt;name );
</ins><span class="cx">         }
</span><span class="cx">         unset($tax);
</span><span class="cx"> 
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx">                 if ( ! $tax-&gt;show_ui || ! in_array($ptype, (array) $tax-&gt;object_type, true) )
</span><span class="cx">                         continue;
</span><span class="cx"> 
</span><del>-                $submenu[&quot;edit.php?post_type=$ptype&quot;][$i++] = array( esc_attr($tax-&gt;label), $tax-&gt;cap-&gt;manage_terms, &quot;edit-tags.php?taxonomy=$tax-&gt;name&amp;amp;post_type=$ptype&quot; );
</del><ins>+                $submenu[&quot;edit.php?post_type=$ptype&quot;][$i++] = array( esc_attr( $tax-&gt;labels-&gt;name ), $tax-&gt;cap-&gt;manage_terms, &quot;edit-tags.php?taxonomy=$tax-&gt;name&amp;amp;post_type=$ptype&quot; );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> unset($ptype, $ptype_obj);
</span></span></pre></div>
<a id="trunkwpadminpressthisphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/press-this.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/press-this.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-admin/press-this.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -488,7 +488,7 @@
</span><span class="cx">                                 &lt;div id=&quot;taxonomy-category&quot; class=&quot;categorydiv&quot;&gt;
</span><span class="cx"> 
</span><span class="cx">                                         &lt;ul id=&quot;category-tabs&quot; class=&quot;category-tabs&quot;&gt;
</span><del>-                                                &lt;li class=&quot;tabs&quot;&gt;&lt;a href=&quot;#category-all&quot; tabindex=&quot;3&quot;&gt;&lt;?php printf( __( 'All %s' ), $tax-&gt;label ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                                                &lt;li class=&quot;tabs&quot;&gt;&lt;a href=&quot;#category-all&quot; tabindex=&quot;3&quot;&gt;&lt;?php echo $tax-&gt;labels-&gt;all_items; ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx">                                                 &lt;li class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#category-pop&quot; tabindex=&quot;3&quot;&gt;&lt;?php _e( 'Most Used' ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</span><span class="cx">                                         &lt;/ul&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -509,11 +509,19 @@
</span><span class="cx">                                         &lt;?php endif; ?&gt;
</span><span class="cx">                                         &lt;?php if ( current_user_can($tax-&gt;cap-&gt;edit_terms) ) : ?&gt;
</span><span class="cx">                                                 &lt;div id=&quot;category-adder&quot; class=&quot;wp-hidden-children&quot;&gt;
</span><del>-                                                        &lt;h4&gt;&lt;a id=&quot;category-add-toggle&quot; href=&quot;#category-add&quot; class=&quot;hide-if-no-js&quot; tabindex=&quot;3&quot;&gt;&lt;?php printf( __( '+ Add New %s' ), $tax-&gt;singular_label ); ?&gt;&lt;/a&gt;&lt;/h4&gt;
</del><ins>+                                                        &lt;h4&gt;
+                                                                &lt;a id=&quot;category-add-toggle&quot; href=&quot;#category-add&quot; class=&quot;hide-if-no-js&quot; tabindex=&quot;3&quot;&gt;
+                                                                        &lt;?php printf( __( '+ %s' ), $tax-&gt;labels-&gt;add_new_item ); ?&gt;
+                                                                &lt;/a&gt;
+                                                        &lt;/h4&gt;
</ins><span class="cx">                                                         &lt;p id=&quot;category-add&quot; class=&quot;category-add wp-hidden-child&quot;&gt;
</span><del>-                                                                &lt;label class=&quot;screen-reader-text&quot; for=&quot;newcategory&quot;&gt;&lt;?php printf( __( 'Add New %s' ), $tax-&gt;singular_label ); ?&gt;&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;newcategory&quot; id=&quot;newcategory&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&lt;?php echo esc_attr( sprintf( 'New %s Name', $tax-&gt;singular_label ) ); ?&gt;&quot; tabindex=&quot;3&quot; aria-required=&quot;true&quot;/&gt;
-                                                                &lt;label class=&quot;screen-reader-text&quot; for=&quot;newcategory_parent&quot;&gt;&lt;?php printf( __('Parent %s'), $tax-&gt;singular_label ); ?&gt;:&lt;/label&gt;&lt;?php wp_dropdown_categories( array( 'taxonomy' =&gt; 'category', 'hide_empty' =&gt; 0, 'name' =&gt; 'newcategory_parent', 'orderby' =&gt; 'name', 'hierarchical' =&gt; 1, 'show_option_none' =&gt; sprintf( __('&amp;mdash; Parent %s &amp;mdash;'), $tax-&gt;singular_label ), 'tab_index' =&gt; 3 ) ); ?&gt;
-                                                                &lt;input type=&quot;button&quot; id=&quot;category-add-submit&quot; class=&quot;add:categorychecklist:category-add button category-add-sumbit&quot; value=&quot;&lt;?php esc_attr_e( 'Add' ); ?&gt;&quot; tabindex=&quot;3&quot; /&gt;
</del><ins>+                                                                &lt;label class=&quot;screen-reader-text&quot; for=&quot;newcategory&quot;&gt;&lt;?php echo $tax-&gt;labels-&gt;add_new_item; ?&gt;&lt;/label&gt;
+                                                                &lt;input type=&quot;text&quot; name=&quot;newcategory&quot; id=&quot;newcategory&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;labels-&gt;new_item_name ); ?&gt;&quot; tabindex=&quot;3&quot; aria-required=&quot;true&quot;/&gt;
+                                                                &lt;label class=&quot;screen-reader-text&quot; for=&quot;newcategory_parent&quot;&gt;
+                                                                        &lt;?php echo $tax-&gt;labels-&gt;parent_item_colon; ?&gt;
+                                                                &lt;/label&gt;
+                                                                &lt;?php wp_dropdown_categories( array( 'taxonomy' =&gt; 'category', 'hide_empty' =&gt; 0, 'name' =&gt; 'newcategory_parent', 'orderby' =&gt; 'name', 'hierarchical' =&gt; 1, 'show_option_none' =&gt; '&amp;mdash; ' . $tax-&gt;labels-&gt;parent_item . ' &amp;mdash;', 'tab_index' =&gt; 3 ) ); ?&gt;
+                                                                &lt;input type=&quot;button&quot; id=&quot;category-add-submit&quot; class=&quot;add:categorychecklist:category-add button category-add-sumbit&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;labels-&gt;add_new_item ); ?&gt;&quot; tabindex=&quot;3&quot; /&gt;
</ins><span class="cx">                                                                 &lt;?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?&gt;
</span><span class="cx">                                                                 &lt;span id=&quot;category-ajax-response&quot;&gt;&lt;/span&gt;
</span><span class="cx">                                                         &lt;/p&gt;
</span></span></pre></div>
<a id="trunkwpincludesdefaultwidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-widgets.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-widgets.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-includes/default-widgets.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -1003,7 +1003,7 @@
</span><span class="cx">                                 $title = __('Tags');
</span><span class="cx">                         } else {
</span><span class="cx">                                 $tax = get_taxonomy($current_taxonomy);
</span><del>-                                $title = $tax-&gt;label;
</del><ins>+                                $title = $tax-&gt;labels-&gt;name;
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 $title = apply_filters('widget_title', $title, $instance, $this-&gt;id_base);
</span><span class="lines">@@ -1032,10 +1032,10 @@
</span><span class="cx">         &lt;select class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('taxonomy'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('taxonomy'); ?&gt;&quot;&gt;
</span><span class="cx">         &lt;?php foreach ( get_object_taxonomies('post') as $taxonomy ) :
</span><span class="cx">                                 $tax = get_taxonomy($taxonomy);
</span><del>-                                if ( !$tax-&gt;show_tagcloud || empty($tax-&gt;label) )
</del><ins>+                                if ( !$tax-&gt;show_tagcloud || empty($tax-&gt;labels-&gt;name) )
</ins><span class="cx">                                         continue;
</span><span class="cx">         ?&gt;
</span><del>-                &lt;option value=&quot;&lt;?php echo esc_attr($taxonomy) ?&gt;&quot; &lt;?php selected($taxonomy, $current_taxonomy) ?&gt;&gt;&lt;?php echo $tax-&gt;label ?&gt;&lt;/option&gt;
</del><ins>+                &lt;option value=&quot;&lt;?php echo esc_attr($taxonomy) ?&gt;&quot; &lt;?php selected($taxonomy, $current_taxonomy) ?&gt;&gt;&lt;?php echo $tax-&gt;labels-&gt;name; ?&gt;&lt;/option&gt;
</ins><span class="cx">         &lt;?php endforeach; ?&gt;
</span><span class="cx">         &lt;/select&gt;&lt;/p&gt;&lt;?php
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-includes/general-template.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -588,10 +588,9 @@
</span><span class="cx">         if ( is_tax() ) {
</span><span class="cx">                 $taxonomy = get_query_var( 'taxonomy' );
</span><span class="cx">                 $tax = get_taxonomy( $taxonomy );
</span><del>-                $tax = $tax-&gt;label;
</del><span class="cx">                 $term = $wp_query-&gt;get_queried_object();
</span><span class="cx">                 $term = $term-&gt;name;
</span><del>-                $title = $tax . $t_sep . $term;
</del><ins>+                $title = $tax-&gt;labels-&gt;name . $t_sep . $term;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         //If it's a search
</span></span></pre></div>
<a id="trunkwpincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-includes/nav-menu.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -538,7 +538,7 @@
</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;type_label = $object-&gt;singular_label;
</del><ins>+                                $menu_item-&gt;type_label = $object-&gt;labels-&gt;singular_name;
</ins><span class="cx">                                 $term_url = get_term_link( (int) $menu_item-&gt;object_id, $menu_item-&gt;object );
</span><span class="cx">                                 $menu_item-&gt;url = !is_wp_error( $term_url ) ? $term_url : '';
</span><span class="cx"> 
</span><span class="lines">@@ -587,7 +587,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;type_label = $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;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 (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-includes/post.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -40,7 +40,9 @@
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="cx">         register_post_type( 'attachment', array(
</span><del>-                'label' =&gt; __( 'Media' ),
</del><ins>+                'labels' =&gt; array(
+                        'name' =&gt; __( 'Media' ),
+                ),
</ins><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">@@ -53,8 +55,10 @@
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="cx">         register_post_type( 'revision', array(
</span><del>-                'label' =&gt; __( 'Revisions' ),
-                'singular_label' =&gt; __( 'Revision' ),
</del><ins>+                'labels' =&gt; array(
+                        'name' =&gt; __( 'Revisions' ),
+                        'singular_name' =&gt; __( 'Revision' ),
+                ),
</ins><span class="cx">                 'public' =&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="cx">                 '_edit_link' =&gt; 'revision.php?revision=%d', /* internal use only. don't use this when registering your own post type. */
</span><span class="lines">@@ -65,8 +69,10 @@
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="cx">         register_post_type( 'nav_menu_item', array(
</span><del>-                'label' =&gt; __( 'Navigation Menu Items' ),
-                'singular_label' =&gt; __( 'Navigation Menu Item' ),
</del><ins>+                'labels' =&gt; array(
+                        'name' =&gt; __( 'Navigation Menu Items' ),
+                        'singular_name' =&gt; __( 'Navigation Menu Item' ),
+                ),
</ins><span class="cx">                 'public' =&gt; false,
</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">@@ -925,7 +931,7 @@
</span><span class="cx">  * - search_items - Default is Search Posts/Search Pages
</span><span class="cx">  * - not_found - Default is No posts found/No pages found
</span><span class="cx">  * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash
</span><del>- * - parent - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page:
</del><ins>+ * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page:
</ins><span class="cx">  * 
</span><span class="cx">  * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages.)
</span><span class="cx">  * 
</span><span class="lines">@@ -947,22 +953,35 @@
</span><span class="cx">                 'not_found' =&gt; array( __('No posts found'), __('No pages found') ),
</span><span class="cx">                 'not_found_in_trash' =&gt; array( __('No posts found in Trash'), __('No pages found in Trash') ),
</span><span class="cx">                 'view' =&gt; array( __('View Post'), __('View Page') ),
</span><del>-                'parent' =&gt; array( null, __('Parent Page:') )
</del><ins>+                'parent_item_colon' =&gt; array( null, __('Parent Page:') )
</ins><span class="cx">         );
</span><ins>+        return _get_custom_object_labels( $post_type_object, $nohier_vs_hier_defaults );
+}
+
+/**
+ * Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object
+ * 
+ * @access private
+ */
+function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
</ins><span class="cx">         
</span><span class="cx">         // try to get missing (singular_)?name from older style (singular_)?label member variables
</span><span class="cx">         // we keep that for backwards compatibility
</span><span class="cx">         // TODO: remove in 3.1
</span><del>-        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;
</del><ins>+        if ( !isset( $object-&gt;labels['name'] ) &amp;&amp; isset( $object-&gt;label ) ) {
+                $object-&gt;labels['name'] = $object-&gt;label;
</ins><span class="cx">         }
</span><del>-        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;
</del><ins>+        if ( !isset( $object-&gt;labels['singular_name'] ) &amp;&amp; isset( $object-&gt;singular_label ) ) {
+                $object-&gt;labels['singular_name'] = $object-&gt;singular_label;
</ins><span class="cx">         }
</span><span class="cx">         
</span><del>-        $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;
</del><ins>+        if ( !isset( $object-&gt;labels['singular_name'] ) &amp;&amp; isset( $object-&gt;labels['name'] ) ) {
+                $object-&gt;labels['singular_name'] = $object-&gt;labels['name'];
+        }
+        
+        $defaults = array_map( create_function( '$x', $object-&gt;hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
+        $labels = array_merge( $defaults, $object-&gt;labels );
+        return (object)$labels;        
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpincludestaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/taxonomy.php (14613 => 14614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/taxonomy.php        2010-05-14 00:21:45 UTC (rev 14613)
+++ trunk/wp-includes/taxonomy.php        2010-05-14 00:34:04 UTC (rev 14614)
</span><span class="lines">@@ -18,8 +18,6 @@
</span><span class="cx">         register_taxonomy( 'category', 'post', array(
</span><span class="cx">                 'hierarchical' =&gt; true,
</span><span class="cx">                  'update_count_callback' =&gt; '_update_post_term_count',
</span><del>-                'label' =&gt; __( 'Categories' ),
-                'singular_label' =&gt; __( 'Category' ),
</del><span class="cx">                 'query_var' =&gt; false,
</span><span class="cx">                 'rewrite' =&gt; false,
</span><span class="cx">                 'public' =&gt; true,
</span><span class="lines">@@ -30,8 +28,6 @@
</span><span class="cx">         register_taxonomy( 'post_tag', 'post', array(
</span><span class="cx">                  'hierarchical' =&gt; false,
</span><span class="cx">                 'update_count_callback' =&gt; '_update_post_term_count',
</span><del>-                'label' =&gt; __( 'Post Tags' ),
-                'singular_label' =&gt; __( 'Post Tag' ),
</del><span class="cx">                 'query_var' =&gt; false,
</span><span class="cx">                 'rewrite' =&gt; false,
</span><span class="cx">                 'public' =&gt; true,
</span><span class="lines">@@ -41,8 +37,10 @@
</span><span class="cx"> 
</span><span class="cx">         register_taxonomy( 'nav_menu', 'nav_menu_item', array(
</span><span class="cx">                 'hierarchical' =&gt; false,
</span><del>-                'label' =&gt; __( 'Navigation Menus' ),
-                'singular_label' =&gt; __( 'Navigation Menu' ),
</del><ins>+                'labels' =&gt; array(
+                        'name' =&gt; __( 'Navigation Menus' ),
+                        'singular_name' =&gt; __( 'Navigation Menu' ),
+                ),
</ins><span class="cx">                 'query_var' =&gt; false,
</span><span class="cx">                 'rewrite' =&gt; false,
</span><span class="cx">                 'show_ui' =&gt; false,
</span><span class="lines">@@ -51,7 +49,10 @@
</span><span class="cx"> 
</span><span class="cx">         register_taxonomy( 'link_category', 'link', array(
</span><span class="cx">                 'hierarchical' =&gt; false,
</span><del>-                  'label' =&gt; __( 'Categories' ),
</del><ins>+                'labels' =&gt; array(
+                        'name' =&gt; __( 'Categories' ),
+                        'singular_name' =&gt; __( 'Category' ),
+                ),
</ins><span class="cx">                 'query_var' =&gt; false,
</span><span class="cx">                 'rewrite' =&gt; false,
</span><span class="cx">                 'public' =&gt; false,
</span><span class="lines">@@ -230,6 +231,8 @@
</span><span class="cx">  *
</span><span class="cx">  * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget;
</span><span class="cx">  * defaults to show_ui which defalts to public.
</span><ins>+ * 
+ * labels - An array of labels for this taxonomy. You can see accepted values in {@link get_taxonomy_labels()}. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones.
</ins><span class="cx">  *
</span><span class="cx">  * @package WordPress
</span><span class="cx">  * @subpackage Taxonomy
</span><span class="lines">@@ -254,11 +257,11 @@
</span><span class="cx">                                                 'query_var' =&gt; $taxonomy,
</span><span class="cx">                                                 'public' =&gt; true,
</span><span class="cx">                                                 'show_ui' =&gt; null,
</span><del>-                                                'label' =&gt; null,
</del><span class="cx">                                                 'show_tagcloud' =&gt; null,
</span><span class="cx">                                                 '_builtin' =&gt; false,
</span><ins>+                                                'labels' =&gt; array(),
</ins><span class="cx">                                                 'capabilities' =&gt; array(),
</span><del>-                                                );
</del><ins>+                                        );
</ins><span class="cx">         $args = wp_parse_args($args, $defaults);
</span><span class="cx"> 
</span><span class="cx">         if ( false !== $args['query_var'] &amp;&amp; !empty($wp) ) {
</span><span class="lines">@@ -283,9 +286,6 @@
</span><span class="cx">         if ( is_null($args['show_tagcloud']) )
</span><span class="cx">                 $args['show_tagcloud'] = $args['show_ui'];
</span><span class="cx"> 
</span><del>-        if ( is_null($args['label'] ) )
-                $args['label'] = $taxonomy;
-
</del><span class="cx">         $default_caps = array(
</span><span class="cx">                 'manage_terms' =&gt; 'manage_categories',
</span><span class="cx">                 'edit_terms'   =&gt; 'manage_categories',
</span><span class="lines">@@ -295,11 +295,15 @@
</span><span class="cx">         $args['cap'] = (object) array_merge( $default_caps, $args['capabilities'] );
</span><span class="cx">         unset( $args['capabilities'] );
</span><span class="cx"> 
</span><del>-        if ( empty($args['singular_label']) )
-                $args['singular_label'] = $args['label'];
-
</del><span class="cx">         $args['name'] = $taxonomy;
</span><span class="cx">         $args['object_type'] = (array) $object_type;
</span><ins>+        $args['labels'] = get_taxonomy_labels( (object) $args );
+        
+        // we keep these two only for backwards compatibility
+        // TODO: remove in 3.1        
+        $args['label'] = $args['labels']-&gt;name;
+        $args['singular_label'] = $args['labels']-&gt;singular_name;
+        
</ins><span class="cx">         $wp_taxonomies[$taxonomy] = (object) $args;
</span><span class="cx"> 
</span><span class="cx">         // register callback handling for metabox
</span><span class="lines">@@ -307,6 +311,47 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Builds an object with all taxonomy labels out of a taxonomy object
+ * 
+ * Accepted keys of the label array in the taxonomy object:
+ * - name - general name for the taxonomy, usually plural. Default is Post Tags/Categories
+ * - singular_name - name for one object of this taxonomy. Default is Post Tag/Category
+ * - search_items - Default is Search Tags/Search Categories
+ * - popular_items - Default is Popular Tags/Popular Categories
+ * - all_items - Default is All Tags/All Categories
+ * - parent_item - This string isn't used on non-hierarchical taxonomies. In hierarchical ones the default is Parent Category
+ * - parent_item_colon - The same as &lt;code&gt;parent_item&lt;/code&gt;, but with colon &lt;code&gt;:&lt;/code&gt; in the end
+ * - edit_item - Default is Edit Tag/Edit Category
+ * - update_item - Default is Update Tag/Update Category
+ * - add_new_item - Default is Add New Tag/Add New Category
+ * - new_item_name - Default is New Tag Name/New Category Name
+ * 
+ * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories.)
+ * 
+ * @since 3.0.0
+ * @param object $tax Taxonomy object
+ * @return object object with all the labels as member variables
+ */
+
+function get_taxonomy_labels( $tax ) {
+        $nohier_vs_hier_defaults = array(
+                'name' =&gt; array( _x( 'Post Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ),
+                'singular_name' =&gt; array( _x( 'Post Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ),
+                'search_items' =&gt; array( __( 'Search Tags' ), __( 'Search Categories' ) ),
+                'popular_items' =&gt; array( __( 'Popular Tags' ), __( 'Popular Category' ) ),
+                'all_items' =&gt; array( __( 'All Tags' ), __( 'All Categories' ) ),
+                'parent_item' =&gt; array( null, __( 'Parent Category' ) ),
+                'parent_item_colon' =&gt; array( null, __( 'Parent Category:' ) ),
+                'edit_item' =&gt; array( __( 'Edit Tag' ), __( 'Edit Category' ) ),
+                'update_item' =&gt; array( __( 'Update Tag' ), __( 'Update Category' ) ),
+                'add_new_item' =&gt; array( __( 'Add New Tag' ), __( 'Add New Category' ) ),
+                'new_item_name' =&gt; array( __( 'New Tag Name' ), __( 'New Category Name' ) ),
+        );
+
+        return _get_custom_object_labels( $tax, $nohier_vs_hier_defaults );
+}
+
+/**
</ins><span class="cx">  * Add an already registered taxonomy to an object type.
</span><span class="cx">  *
</span><span class="cx">  * @package WordPress
</span><span class="lines">@@ -2612,6 +2657,3 @@
</span><span class="cx"> 
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><del>-
-
-?&gt;
</del></span></pre>
</div>
</div>

</body>
</html>