Can the default “post tags” taxonomy be renamed?

The information about taxonomies is stored in the global $wp_taxonomies array. If you register a new taxonomy, it is added as an object with different properties, including the labels to use in the UI. The standard tags and categories are also registered there on each page load, with the create_initial_taxonomies() function that fires on init.

Since it is a simple array of objects, we can modify it and see what happens. The properties we are interested in are labels and label.

add_action( 'init', 'wpa4182_init');
function wpa4182_init()
{
    global $wp_taxonomies;

    // The list of labels we can modify comes from
    //  http://codex.wordpress.org/Function_Reference/register_taxonomy
    //  http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/taxonomy.php#L350
    $wp_taxonomies['post_tag']->labels = (object)array(
        'name' => 'WPA 4182 Tags',
        'menu_name' => 'WPA 4182 Tags',
        'singular_name' => 'WPA 4182 Tag',
        'search_items' => 'Search WPA 4182 Tags',
        'popular_items' => 'Popular WPA 4182 Tags',
        'all_items' => 'All WPA 4182 Tags',
        'parent_item' => null, // Tags aren't hierarchical
        'parent_item_colon' => null,
        'edit_item' => 'Edit WPA 4182 Tag',
        'update_item' => 'Update WPA 4182 Tag',
        'add_new_item' => 'Add new WPA 4182 Tag',
        'new_item_name' => 'New WPA 4182 Tag Name',
        'separate_items_with_commas' => 'Separata WPA 4182 tags with commas',
        'add_or_remove_items' => 'Add or remove WPA 4182 tags',
        'choose_from_most_used' => 'Choose from the most used WPA 4182 tags',
    );

    $wp_taxonomies['post_tag']->label="WPA 4182 Tags";
}

I haven’t checked it everywhere, and you’ll probably have to change it in your theme yourself, but this seems to do what you want:

Tag metabox with new labels

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)