wpcrm_system_taxonomy_labels_{post-type}

The wpcrm_system_taxonomy_labels_{post-type} filter lets you edit the labels that are used in the WP-CRM System for the various post types of taxonomies.

Each type of record has its own post type, so the filters used will be specific for each post type:

  • wpcrm_system_taxonomy_labels_wpcrm-contact
  • wpcrm_system_taxonomy_labels_wpcrm-organization
  • wpcrm_system_taxonomy_labels_wpcrm-project
  • wpcrm_system_taxonomy_labels_wpcrm-task
  • wpcrm_system_taxonomy_labels_wpcrm-opportunity
  • wpcrm_system_taxonomy_labels_wpcrm-campaign

The filter receives an array with the default labels and expects an array of labels to be returned.

For more information on possible labels that can be added, please see the WordPress documentation on Taxonomy labels.

By default, the following labels are included:

$labels = array(
    'name'              => __( 'Contact Types', 'wp-crm-system' ),
    'singular_name'        => __( 'Contact Type', 'wp-crm-system' ),
    'edit_item'         => __( 'Edit Contact Type', 'wp-crm-system' ),
    'update_item'       => __( 'Update Contact Type', 'wp-crm-system' ),
    'add_new_item'      => __( 'Add New Contact Type', 'wp-crm-system' ),
    'new_item_name'     => __( 'New Contact Type', 'wp-crm-system' ),
    'menu_name'         => __( 'Contact Types', 'wp-crm-system' ),
);

Each post type is passed the same array with the exception of the values shown will be specific to that post type (Contact will be changed to the appropriate record type).

An example of changing the word “Contact” to something more specific like “Customer”.

add_filter( 'wpcrm_system_taxonomy_labels_wpcrm-contact', 'change_contact_to_customer' );
function change_contact_to_customer( $labels ){
    $labels = array(
        'name'              => __( 'Customer Types', 'wp-crm-system' ),
        'singular_name'        => __( 'Customer Type', 'wp-crm-system' ),
        'edit_item'         => __( 'Edit Customer Type', 'wp-crm-system' ),
        'update_item'       => __( 'Update Customer Type', 'wp-crm-system' ),
        'add_new_item'      => __( 'Add New Customer Type', 'wp-crm-system' ),
        'new_item_name'     => __( 'New Customer Type', 'wp-crm-system' ),
        'menu_name'         => __( 'Customer Types', 'wp-crm-system' ),
    );
    return $labels;
}