<!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' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => sprintf( __('&mdash; Parent %s &mdash;'), $taxonomy->singular_label ) ) );
</del><ins>+                wp_dropdown_categories( array(
+                        'taxonomy' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name',
+                        'hierarchical' => 1, 'show_option_none' => '&mdash; '.$taxonomy->labels->parent_item.' &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' => $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->show_ui )
</span><span class="cx">                 continue;
</span><span class="cx">
</span><del>-        $label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name;
</del><ins>+        $label = $taxonomy->labels->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"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><del>-<h2><?php printf(_x('Edit %s', '%s: singular taxonomy name'), $tax->singular_label); ?></h2>
</del><ins>+<h2><?php echo $tax->labels->edit_item; ?></h2>
</ins><span class="cx"> <div id="ajax-response"></div>
</span><span class="cx"> <form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">
</span><span class="cx"> <input type="hidden" name="action" value="editedtag" />
</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"> ?>
</span><del>-<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php echo esc_attr( sprintf(_x('Update %s', '%s: singular taxonomy name'), $tax->singular_label)); ?>" /></p>
</del><ins>+<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php echo esc_attr( __( 'Update' ) ); ?>" /></p>
</ins><span class="cx"> </form>
</span><span class="cx"> </div>
</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->label;
</del><ins>+$title = $tax->labels->name;
</ins><span class="cx">
</span><span class="cx"> if ( empty($post_type) || !in_array( $post_type, get_post_types( array('public' => 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->singular_label);
</del><ins>+        $title = $tax->labels->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"> <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
</span><span class="cx"> <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
</span><span class="cx"> <p class="search-box">
</span><del>-        <label class="screen-reader-text" for="tag-search-input"><?php printf(_x('Search %s', '%s: plural taxonomy name'), $tax->label); ?>:</label>
</del><ins>+        <label class="screen-reader-text" for="tag-search-input"><?php echo $tax->labels->search_items; ?>:</label>
</ins><span class="cx">         <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" />
</span><del>-        <input type="submit" value="<?php echo esc_attr( sprintf(_x('Search %s', '%s: plural taxonomy name'), $tax->label) ); ?>" class="button" />
</del><ins>+        <input type="submit" value="<?php echo esc_attr( $tax->labels->search_items ); ?>" class="button" />
</ins><span class="cx"> </p>
</span><span class="cx"> </form>
</span><span class="cx"> <br class="clear" />
</span><span class="lines">@@ -326,7 +326,7 @@
</span><span class="cx"> if ( $tag_cloud ) :
</span><span class="cx"> ?>
</span><span class="cx"> <div class="tagcloud">
</span><del>-<h3><?php printf(_x('Popular %s', '%s: plural taxonomy name'), $tax->label); ?></h3>
</del><ins>+<h3><?php echo $tax->labels->popular_items; ?></h3>
</ins><span class="cx"> <?php echo $tag_cloud; unset( $tag_cloud ); ?>
</span><span class="cx"> </div>
</span><span class="cx"> <?php
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <div class="form-wrap">
</span><del>-<h3><?php printf(_x('Add a New %s', '%s: singular taxonomy name'), $tax->singular_label); ?></h3>
</del><ins>+<h3><?php echo $tax->labels->add_new_item; ?></h3>
</ins><span class="cx"> <form id="addtag" method="post" action="edit-tags.php" class="validate">
</span><span class="cx"> <input type="hidden" name="action" value="add-tag" />
</span><span class="cx"> <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
</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"> ?>
</span><del>-<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php echo esc_attr(sprintf(_x('Add %s', '%s: singular taxonomy name'), $tax->singular_label)); ?>" /></p>
</del><ins>+<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /></p>
</ins><span class="cx"> <?php
</span><span class="cx"> if ( 'category' == $taxonomy )
</span><span class="cx">         do_action('edit_category_form',        (object)array('parent' => 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"> <?php foreach ( get_taxonomies( array( 'show_ui' => true ), 'objects' ) as $tax_obj ) {
</span><span class="cx">         $term_dropdown = wp_dropdown_categories( array( 'taxonomy' => $tax_obj->name, 'hide_if_empty' => true, 'show_option_all' => __( 'All Terms' ), 'name' => 'taxonomy[' . $tax_obj->name . ']', 'id' => 'taxonomy-' . $tax_obj->name, 'class' => '', 'echo' => false ) );
</span><span class="cx">         if ( $term_dropdown )
</span><del>-                echo '<label for="taxonomy-' . $tax_obj->name . '">' . $tax_obj->label . '</label>: ' . $term_dropdown . '<br/>';
</del><ins>+                echo '<label for="taxonomy-' . $tax_obj->name . '">' . $tax_obj->labels->name . '</label>: ' . $term_dropdown . '<br/>';
</ins><span class="cx"> }
</span><span class="cx"> ?>
</span><span class="cx"> </td>
</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">         ?>
</span><span class="cx">         <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv">
</span><span class="cx">                 <ul id="<?php echo $taxonomy; ?>-tabs" class="category-tabs">
</span><del>-                        <li class="tabs"><a href="#<?php echo $taxonomy; ?>-all" tabindex="3"><?php printf( __( 'All %s' ), $tax->label ); ?></a></li>
</del><ins>+                        <li class="tabs"><a href="#<?php echo $taxonomy; ?>-all" tabindex="3"><?php echo $tax->labels->all_items; ?></a></li>
</ins><span class="cx">                         <li class="hide-if-no-js"><a href="#<?php echo $taxonomy; ?>-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>
</span><span class="cx">                 </ul>
</span><span class="cx">
</span><span class="lines">@@ -320,11 +320,22 @@
</span><span class="cx">         <?php endif; ?>
</span><span class="cx">         <?php if ( current_user_can($tax->cap->edit_terms) ) : ?>
</span><span class="cx">                         <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children">
</span><del>-                                <h4><a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js" tabindex="3"><?php printf( __( '+ Add New %s' ), $tax->singular_label ); ?></a></h4>
</del><ins>+                                <h4>
+                                        <a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js" tabindex="3">
+                                                <?php
+                                                        /* translators: %s: add new taxonomy label */
+                                                        printf( __( '+ %s' ), $tax->labels->add_new_item );
+                                                ?>
+                                        </a>
+                                </h4>
</ins><span class="cx">                                 <p id="<?php echo $taxonomy; ?>-add" class="category-add wp-hidden-child">
</span><del>-                                        <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>"><?php printf( __( 'Add New %s' ), $tax->singular_label ); ?></label><input type="text" name="new<?php echo $taxonomy; ?>" id="new<?php echo $taxonomy; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( sprintf( 'New %s Name', $tax->singular_label ) ); ?>" tabindex="3" aria-required="true"/>
-                                        <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>_parent"><?php printf( __('Parent %s'), $tax->singular_label ); ?>:</label><?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => sprintf( __('&mdash; Parent %s &mdash;'), $tax->singular_label ), 'tab_index' => 3 ) ); ?>
-                                        <input type="button" id="<?php echo $taxonomy; ?>-add-submit" class="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add button category-add-sumbit" value="<?php esc_attr_e( 'Add' ); ?>" tabindex="3" />
</del><ins>+                                        <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>"><?php echo $tax->labels->add_new_item; ?></label>
+                                        <input type="text" name="new<?php echo $taxonomy; ?>" id="new<?php echo $taxonomy; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $tax->labels->new_item_name ); ?>" tabindex="3" aria-required="true"/>
+                                        <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>_parent">
+                                                <?php echo $tax->labels->parent_item_colon; ?>
+                                        </label>
+                                        <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) ); ?>
+                                        <input type="button" id="<?php echo $taxonomy; ?>-add-submit" class="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add button category-add-sumbit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" tabindex="3" />
</ins><span class="cx">                                         <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce', false ); ?>
</span><span class="cx">                                         <span id="<?php echo $taxonomy; ?>-ajax-response"></span>
</span><span class="cx">                                 </p>
</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->name;
</span><del>-                        add_meta_box( "add-{$id}", $tax->label, 'wp_nav_menu_item_taxonomy_meta_box', 'nav-menus', 'side', 'default', $tax );
</del><ins>+                        add_meta_box( "add-{$id}", $tax->labels->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">         <p class="inline-edit-save submit">
</span><span class="cx">                 <a accesskey="c" href="#inline-edit" title="<?php _e('Cancel'); ?>" class="cancel button-secondary alignleft"><?php _e('Cancel'); ?></a>
</span><del>-                <?php $update_text = sprintf( __('Update %s'), $tax->singular_label ); ?>
</del><ins>+                <?php $update_text = $tax->labels->update_item; ?>
</ins><span class="cx">                 <a accesskey="s" href="#inline-edit" title="<?php echo esc_attr( $update_text ); ?>" class="save button-primary alignright"><?php echo $update_text; ?></a>
</span><span class="cx">                 <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
</span><span class="cx">                 <span class="error" style="display:none;"></span>
</span><span class="lines">@@ -976,7 +976,7 @@
</span><span class="cx">
</span><span class="cx"> <?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
</span><span class="cx">
</span><del>-                <span class="title inline-edit-categories-label"><?php echo esc_html($taxonomy->label) ?>
</del><ins>+                <span class="title inline-edit-categories-label"><?php echo esc_html($taxonomy->labels->name) ?>
</ins><span class="cx">                         <span class="catshow"><?php _e('[more]'); ?></span>
</span><span class="cx">                         <span class="cathide" style="display:none;"><?php _e('[less]'); ?></span>
</span><span class="cx">                 </span>
</span><span class="lines">@@ -1040,7 +1040,7 @@
</span><span class="cx"> <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
</span><span class="cx">
</span><span class="cx">                 <label class="inline-edit-tags">
</span><del>-                        <span class="title"><?php echo esc_html($taxonomy->label) ?></span>
</del><ins>+                        <span class="title"><?php echo esc_html($taxonomy->labels->name) ?></span>
</ins><span class="cx">                         <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr($taxonomy->name)?>]" class="tax_input_<?php echo esc_attr($taxonomy->name)?>"></textarea>
</span><span class="cx">                 </label>
</span><span class="cx">
</span><span class="lines">@@ -1566,7 +1566,7 @@
</span><span class="cx">                 $attributes = 'class="post-title page-title column-title"' . $style;
</span><span class="cx">                 $edit_link = get_edit_post_link( $page->ID );
</span><span class="cx">                 ?>
</span><del>-                <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . $post_type_object->labels->parent . ' ' . esc_html($parent_name) : ''; ?></strong>
</del><ins>+                <td <?php echo $attributes ?>><strong><?php if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name) : ''; ?></strong>
</ins><span class="cx">                 <?php
</span><span class="cx">                 $actions = array();
</span><span class="cx">                 if ( current_user_can($post_type_object->cap->edit_post, $page->ID) && $post->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->label;
</del><ins>+                        $per_page_label = $tax->labels->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->show_ui || ! in_array('post', (array) $tax->object_type, true) )
</span><span class="cx">                         continue;
</span><span class="cx">
</span><del>-                $submenu['edit.php'][$i++] = array( esc_attr($tax->label), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );
</del><ins>+                $submenu['edit.php'][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->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->show_ui || ! in_array($ptype, (array) $tax->object_type, true) )
</span><span class="cx">                         continue;
</span><span class="cx">
</span><del>-                $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr($tax->label), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&amp;post_type=$ptype" );
</del><ins>+                $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&amp;post_type=$ptype" );
</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">                                 <div id="taxonomy-category" class="categorydiv">
</span><span class="cx">
</span><span class="cx">                                         <ul id="category-tabs" class="category-tabs">
</span><del>-                                                <li class="tabs"><a href="#category-all" tabindex="3"><?php printf( __( 'All %s' ), $tax->label ); ?></a></li>
</del><ins>+                                                <li class="tabs"><a href="#category-all" tabindex="3"><?php echo $tax->labels->all_items; ?></a></li>
</ins><span class="cx">                                                 <li class="hide-if-no-js"><a href="#category-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>
</span><span class="cx">                                         </ul>
</span><span class="cx">
</span><span class="lines">@@ -509,11 +509,19 @@
</span><span class="cx">                                         <?php endif; ?>
</span><span class="cx">                                         <?php if ( current_user_can($tax->cap->edit_terms) ) : ?>
</span><span class="cx">                                                 <div id="category-adder" class="wp-hidden-children">
</span><del>-                                                        <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php printf( __( '+ Add New %s' ), $tax->singular_label ); ?></a></h4>
</del><ins>+                                                        <h4>
+                                                                <a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3">
+                                                                        <?php printf( __( '+ %s' ), $tax->labels->add_new_item ); ?>
+                                                                </a>
+                                                        </h4>
</ins><span class="cx">                                                         <p id="category-add" class="category-add wp-hidden-child">
</span><del>-                                                                <label class="screen-reader-text" for="newcategory"><?php printf( __( 'Add New %s' ), $tax->singular_label ); ?></label><input type="text" name="newcategory" id="newcategory" class="form-required form-input-tip" value="<?php echo esc_attr( sprintf( 'New %s Name', $tax->singular_label ) ); ?>" tabindex="3" aria-required="true"/>
-                                                                <label class="screen-reader-text" for="newcategory_parent"><?php printf( __('Parent %s'), $tax->singular_label ); ?>:</label><?php wp_dropdown_categories( array( 'taxonomy' => 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => sprintf( __('&mdash; Parent %s &mdash;'), $tax->singular_label ), 'tab_index' => 3 ) ); ?>
-                                                                <input type="button" id="category-add-submit" class="add:categorychecklist:category-add button category-add-sumbit" value="<?php esc_attr_e( 'Add' ); ?>" tabindex="3" />
</del><ins>+                                                                <label class="screen-reader-text" for="newcategory"><?php echo $tax->labels->add_new_item; ?></label>
+                                                                <input type="text" name="newcategory" id="newcategory" class="form-required form-input-tip" value="<?php echo esc_attr( $tax->labels->new_item_name ); ?>" tabindex="3" aria-required="true"/>
+                                                                <label class="screen-reader-text" for="newcategory_parent">
+                                                                        <?php echo $tax->labels->parent_item_colon; ?>
+                                                                </label>
+                                                                <?php wp_dropdown_categories( array( 'taxonomy' => 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) ); ?>
+                                                                <input type="button" id="category-add-submit" class="add:categorychecklist:category-add button category-add-sumbit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" tabindex="3" />
</ins><span class="cx">                                                                 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
</span><span class="cx">                                                                 <span id="category-ajax-response"></span>
</span><span class="cx">                                                         </p>
</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->label;
</del><ins>+                                $title = $tax->labels->name;
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 $title = apply_filters('widget_title', $title, $instance, $this->id_base);
</span><span class="lines">@@ -1032,10 +1032,10 @@
</span><span class="cx">         <select class="widefat" id="<?php echo $this->get_field_id('taxonomy'); ?>" name="<?php echo $this->get_field_name('taxonomy'); ?>">
</span><span class="cx">         <?php foreach ( get_object_taxonomies('post') as $taxonomy ) :
</span><span class="cx">                                 $tax = get_taxonomy($taxonomy);
</span><del>-                                if ( !$tax->show_tagcloud || empty($tax->label) )
</del><ins>+                                if ( !$tax->show_tagcloud || empty($tax->labels->name) )
</ins><span class="cx">                                         continue;
</span><span class="cx">         ?>
</span><del>-                <option value="<?php echo esc_attr($taxonomy) ?>" <?php selected($taxonomy, $current_taxonomy) ?>><?php echo $tax->label ?></option>
</del><ins>+                <option value="<?php echo esc_attr($taxonomy) ?>" <?php selected($taxonomy, $current_taxonomy) ?>><?php echo $tax->labels->name; ?></option>
</ins><span class="cx">         <?php endforeach; ?>
</span><span class="cx">         </select></p><?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->label;
</del><span class="cx">                 $term = $wp_query->get_queried_object();
</span><span class="cx">                 $term = $term->name;
</span><del>-                $title = $tax . $t_sep . $term;
</del><ins>+                $title = $tax->labels->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->type ) {
</span><span class="cx">                                 $object = get_taxonomy( $menu_item->object );
</span><del>-                                $menu_item->type_label = $object->singular_label;
</del><ins>+                                $menu_item->type_label = $object->labels->singular_name;
</ins><span class="cx">                                 $term_url = get_term_link( (int) $menu_item->object_id, $menu_item->object );
</span><span class="cx">                                 $menu_item->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->taxonomy );
</span><span class="cx">                 $menu_item->object = $object->name;
</span><del>-                $menu_item->type_label = $object->singular_label;
</del><ins>+                $menu_item->type_label = $object->labels->singular_name;
</ins><span class="cx">
</span><span class="cx">                 $menu_item->title = $menu_item->name;
</span><span class="cx">                 $menu_item->url = get_term_link( $menu_item, $menu_item->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' => __( 'Media' ),
</del><ins>+                'labels' => array(
+                        'name' => __( 'Media' ),
+                ),
</ins><span class="cx">                 'public' => true,
</span><span class="cx">                 'show_ui' => false,
</span><span class="cx">                 '_builtin' => 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' => __( 'Revisions' ),
-                'singular_label' => __( 'Revision' ),
</del><ins>+                'labels' => array(
+                        'name' => __( 'Revisions' ),
+                        'singular_name' => __( 'Revision' ),
+                ),
</ins><span class="cx">                 'public' => false,
</span><span class="cx">                 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */
</span><span class="cx">                 '_edit_link' => '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' => __( 'Navigation Menu Items' ),
-                'singular_label' => __( 'Navigation Menu Item' ),
</del><ins>+                'labels' => array(
+                        'name' => __( 'Navigation Menu Items' ),
+                        'singular_name' => __( 'Navigation Menu Item' ),
+                ),
</ins><span class="cx">                 'public' => false,
</span><span class="cx">                 'show_ui' => false,
</span><span class="cx">                 '_builtin' => 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' => array( __('No posts found'), __('No pages found') ),
</span><span class="cx">                 'not_found_in_trash' => array( __('No posts found in Trash'), __('No pages found in Trash') ),
</span><span class="cx">                 'view' => array( __('View Post'), __('View Page') ),
</span><del>-                'parent' => array( null, __('Parent Page:') )
</del><ins>+                'parent_item_colon' => 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->labels['name'] ) && isset( $post_type_object->label ) ) {
-                $post_type_object->labels['name'] = $post_type_object->label;
</del><ins>+        if ( !isset( $object->labels['name'] ) && isset( $object->label ) ) {
+                $object->labels['name'] = $object->label;
</ins><span class="cx">         }
</span><del>-        if ( !isset( $post_type_object->labels['singular_name'] ) && isset( $post_type_object->singular_label ) ) {
-                $post_type_object->labels['singular_name'] = $post_type_object->singular_label;
</del><ins>+        if ( !isset( $object->labels['singular_name'] ) && isset( $object->singular_label ) ) {
+                $object->labels['singular_name'] = $object->singular_label;
</ins><span class="cx">         }
</span><span class="cx">         
</span><del>-        $defaults = array_map( create_function( '$x', $post_type_object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
-        $labels = array_merge( $defaults, $post_type_object->labels );
-        return (object)$labels;
</del><ins>+        if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) {
+                $object->labels['singular_name'] = $object->labels['name'];
+        }
+        
+        $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
+        $labels = array_merge( $defaults, $object->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' => true,
</span><span class="cx">                  'update_count_callback' => '_update_post_term_count',
</span><del>-                'label' => __( 'Categories' ),
-                'singular_label' => __( 'Category' ),
</del><span class="cx">                 'query_var' => false,
</span><span class="cx">                 'rewrite' => false,
</span><span class="cx">                 'public' => true,
</span><span class="lines">@@ -30,8 +28,6 @@
</span><span class="cx">         register_taxonomy( 'post_tag', 'post', array(
</span><span class="cx">                  'hierarchical' => false,
</span><span class="cx">                 'update_count_callback' => '_update_post_term_count',
</span><del>-                'label' => __( 'Post Tags' ),
-                'singular_label' => __( 'Post Tag' ),
</del><span class="cx">                 'query_var' => false,
</span><span class="cx">                 'rewrite' => false,
</span><span class="cx">                 'public' => 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' => false,
</span><del>-                'label' => __( 'Navigation Menus' ),
-                'singular_label' => __( 'Navigation Menu' ),
</del><ins>+                'labels' => array(
+                        'name' => __( 'Navigation Menus' ),
+                        'singular_name' => __( 'Navigation Menu' ),
+                ),
</ins><span class="cx">                 'query_var' => false,
</span><span class="cx">                 'rewrite' => false,
</span><span class="cx">                 'show_ui' => 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' => false,
</span><del>-                 'label' => __( 'Categories' ),
</del><ins>+                'labels' => array(
+                        'name' => __( 'Categories' ),
+                        'singular_name' => __( 'Category' ),
+                ),
</ins><span class="cx">                 'query_var' => false,
</span><span class="cx">                 'rewrite' => false,
</span><span class="cx">                 'public' => 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' => $taxonomy,
</span><span class="cx">                                                 'public' => true,
</span><span class="cx">                                                 'show_ui' => null,
</span><del>-                                                'label' => null,
</del><span class="cx">                                                 'show_tagcloud' => null,
</span><span class="cx">                                                 '_builtin' => false,
</span><ins>+                                                'labels' => array(),
</ins><span class="cx">                                                 'capabilities' => 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'] && !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' => 'manage_categories',
</span><span class="cx">                 'edit_terms' => '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']->name;
+        $args['singular_label'] = $args['labels']->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 <code>parent_item</code>, but with colon <code>:</code> 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' => array( _x( 'Post Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ),
+                'singular_name' => array( _x( 'Post Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ),
+                'search_items' => array( __( 'Search Tags' ), __( 'Search Categories' ) ),
+                'popular_items' => array( __( 'Popular Tags' ), __( 'Popular Category' ) ),
+                'all_items' => array( __( 'All Tags' ), __( 'All Categories' ) ),
+                'parent_item' => array( null, __( 'Parent Category' ) ),
+                'parent_item_colon' => array( null, __( 'Parent Category:' ) ),
+                'edit_item' => array( __( 'Edit Tag' ), __( 'Edit Category' ) ),
+                'update_item' => array( __( 'Update Tag' ), __( 'Update Category' ) ),
+                'add_new_item' => array( __( 'Add New Tag' ), __( 'Add New Category' ) ),
+                'new_item_name' => 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>-
-
-?>
</del></span></pre>
</div>
</div>
</body>
</html>