You appear to be a bot. Output may be restricted
Description
Set default custom taxonomy labelsIt looks like these are the same as for post types – let's check OK, there are a few more… we'll call default_labels first then. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones. Default: if empty, name is set to label value, and singular_name is set to name value
x 'name' - general name for the taxonomy, usually plural. The same as and overridden by $tax->label. Default is _x( 'Post Tags', 'taxonomy general name' ) or _x( 'Categories', 'taxonomy general name' ). When internationalizing this string, please use a gettext context matching your post type. Example: _x('Writers', 'taxonomy general name'); x 'singular_name' - name for one object of this taxonomy. Default is _x( 'Post Tag', 'taxonomy singular name' ) or _x( 'Category', 'taxonomy singular name' ). When internationalizing this string, please use a gettext context matching your post type. Example: _x('Writer', 'taxonomy singular name'); x 'menu_name' - the menu name text. This string is the name to give menu items. Defaults to value of name x 'all_items' - the all items text. Default is __( 'All Tags' ) or __( 'All Categories' ) x 'edit_item' - the edit item text. Default is __( 'Edit Tag' ) or __( 'Edit Category' ) x 'view_item' - the view item text, Default is __( 'View Tag' ) or __( 'View Category' ) 'update_item' - the update item text. Default is __( 'Update Tag' ) or __( 'Update Category' ) x 'add_new_item' - the add new item text. Default is __( 'Add New Tag' ) or __( 'Add New Category' ) 'new_item_name' - the new item name text. Default is __( 'New Tag Name' ) or __( 'New Category Name' ) 'parent_item' - the parent item text. This string is not used on non-hierarchical taxonomies such as post tags. Default is null or __( 'Parent Category' ) 'parent_item_colon' - The same as parent_item, but with colon : in the end null, __( 'Parent Category:' ) x 'search_items' - the search items text. Default is __( 'Search Tags' ) or __( 'Search Categories' ) 'popular_items' - the popular items text. Default is __( 'Popular Tags' ) or null 'separate_items_with_commas' - the separate item with commas text used in the taxonomy meta box. This string isn't used on hierarchical taxonomies. Default is __( 'Separate tags with commas' ), or null 'add_or_remove_items' - the add or remove items text and used in the meta box when JavaScript is disabled. This string isn't used on hierarchical taxonomies. Default is __( 'Add or remove tags' ) or null 'choose_from_most_used' - the choose from most used text used in the taxonomy meta box. This string isn't used on hierarchical taxonomies. Default is __( 'Choose from the most used tags' ) or null 'not_found' (3.6+) - the text displayed via clicking 'Choose from the most used tags' in the taxonomy meta box when no tags are available. This string isn't used on hierarchical taxonomies. Default is __( 'No tags found.' ) or null
Usage
$array = bw_default_taxonomy_labels( $labels );
Parameters
- $labels
- ( array ) optional – An array of labels for this taxonomy.
Returns
array labels with defaults appliedSource
File name: oik/includes/bw_register.phpLines:
1 to 24 of 24
function bw_default_taxonomy_labels( $labels = array() ) { $labels = bw_default_labels( $labels ); $ucplural = bw_array_get( $labels, "name", null ); $ucsingular = bw_array_get( $labels, "singular_name", $ucplural ); /* translators: %s: post type label plural capitalised */ $labels['update_item'] = bw_array_get( $labels, "update_item" , sprintf( __( 'Update %1$s', "oik" ), $ucplural ) ); /* translators: %s: post type label singular capitalised */ $labels['new_item_name'] = bw_array_get( $labels, "new_item_name" , sprintf( __( 'New %1$s', "oik" ), $ucsingular ) ); /* translators: %s: post type label singular capitalised */ $labels['parent_item'] = bw_array_get( $labels, "parent_item" , sprintf( __( 'Parent %1$s', "oik" ), $ucsingular ) ); /* translators: %s: post type label singular capitalised */ $labels['parent_item_colon'] = bw_array_get( $labels, "parent_item_colon" , sprintf( __( 'Parent %1$s:', "oik" ), $ucsingular ) ); /* translators: %s: post type label plural capitalised */ $labels['popular_items'] = bw_array_get( $labels, "popular_items" , sprintf( __( 'Popular %1$s', "oik" ), $ucplural ) ); /* translators: %s: post type label plural capitalised */ $labels['separate_items_with_commas'] = bw_array_get( $labels, "separate_items_with_commas", sprintf( __( 'Separate %1$s with commas', "oik" ), $ucplural ) ); /* translators: %s: post type label plural capitalised */ $labels['add_or_remove_items'] = bw_array_get( $labels, "add_or_remove_items", sprintf( __( 'Add or remove %1$s', "oik" ), $ucplural ) ); /* translators: %s: post type label plural capitalised */ $labels['choose_from_most_used'] = bw_array_get( $labels, "choose_from_most_used", sprintf( __( 'Choose from most used %1$s', "oik" ), $ucplural ) ); // $labels['not_found'] = bw_array_get( $labels, "not_found", sprintf( __( 'No %1$s found', "oik") , $ucplural ) ); //bw_trace2(); return( $labels ); }View on GitHub View on Trac