[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

bw_default_taxonomy_labels() – Set default custom taxonomy labels

You appear to be a bot. Output may be restricted

Description

Set default custom taxonomy labels

It 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 applied

Source

File name: oik/includes/bw_register.php
Lines:

1 to 16 of 16
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 );
  $labels['update_item'] = bw_array_get( $labels, "update_item" , sprintf( __( 'Update %1$s',  "oik" ), $ucplural ) ); 
  $labels['new_item_name'] = bw_array_get( $labels, "new_item_name" , sprintf( __( 'New %1$s', "oik" ), $ucsingular ) ); 
  $labels['parent_item'] = bw_array_get( $labels, "parent_item" , sprintf( __( 'Parent %1$s', "oik" ), $ucsingular ) ); 
  $labels['parent_item_colon'] = bw_array_get( $labels, "parent_item_colon" , sprintf( __( 'Parent %1$s:', "oik" ), $ucsingular ) ); 
  $labels['popular_items'] = bw_array_get( $labels, "popular_items" , sprintf( __( 'Popular %1$s', "oik" ), $ucplural ) ); 
  $labels['separate_items_with_commas'] = bw_array_get( $labels, "separate_items_with_commas", sprintf( __( 'Separate %1$s with commas', "oik" ), $ucplural ) ); 
  $labels['add_or_remove_items'] = bw_array_get( $labels, "add_or_remove_items", sprintf( __( 'Add or remove %1$s', "oik" ), $ucplural ) ); 
  $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

Published: February 2, 2018 | Last updated: February 2, 2018

Information

Function name: bw_default_taxonomy_labels
Plugin ref: oik – oik information kit
Version: 4.1.2
Sourcefile: includes/bw_register.php
File ref: includes/bw_register.php
Deprecated?: No
API Letters: B,D,L,T

Recent plugin updates

oik-themes v1.4.0 

Update to oik-themes v1.4.0 to support Full Site Editing (FSE) themes. FSE themes, which are currently experimental, deliver block based templates and template parts.

 ...
oik-clone v2.0.1 oik-clone v2.0.1 contains a fix for a 500 internal server error being produced when cloning content with certain taxonomy terms. ...
SB Chart block v0.1.1 

Update to SB Chart block v0.1.1 for improved enqueing of the chart.js Javascript and better colours in the Gutenberg palette.

 ...
Slog v1.3.1 

Update to Slog v1.3.1 for a new Driver tab and improved display of charts grouping Elapsed times.

 ...
SB-Chart-Block v0.0.8 SB-Chart-Block v0.0.8, a WordPress single block plugin, supports 4 different chart types; Line, Bar, Horizontal bar and Pie. ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: [email protected]

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2021. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins