wpcrm_system_dashboard_categories_menu

The wpcrm_system_dashboard_categories_menu filter allows you to edit the category dropdown menu shown on WP-CRM System > Dashboard.

By default, the filter is passed an array of categories. The output of the filter expects an array as well, so be sure your variable is returning an array.

The default array looks like this:

$categories = array(
    ''                     => __( 'Go to Category...', 'wp-crm-system' ),
    'organization-type'    => __( 'Organization Categories','wp-crm-system' ),
    'contact-type'        => __( 'Contact Categories','wp-crm-system' ),
    'opportunity-type'    => __( 'Opportunity Categories','wp-crm-system' ),
    'project-type'        => __( 'Project Categories','wp-crm-system' ),
    'task-type'            => __( 'Task Categories','wp-crm-system' ),
    'campaign-type'        => __( 'Campaign Categories','wp-crm-system' )
);

Be sure to keep the keys (i.e. ‘organization-type’, ‘contact-type’, etc.) exactly the same as they are shown here.

You can change the values (i.e. Organization Categories, Contact Categories, etc.) to whatever you want.

If you do not want to show a particular record type in the menu, return an array that excludes the category type(s) you wish to exclude.

An example to change “Contact Categories” to “Client Type”:

add_filter( 'wpcrm_system_dashboard_categories_menu', 'change_contact_to_client' );
function change_contact_to_client( $categories ){
    $categories['contact-type'] = 'Client Type';
    return $categories;
}