Skip to content

Instantly share code, notes, and snippets.

@verygoodplugins
Created July 19, 2023 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verygoodplugins/a40cbf1b7de0e8234d24146ed1826701 to your computer and use it in GitHub Desktop.
Save verygoodplugins/a40cbf1b7de0e8234d24146ed1826701 to your computer and use it in GitHub Desktop.
Appends each CRM field's internal ID to the field label in the dropdowns.
<?php
function add_field_keys_to_names( $fields ) {
foreach ( $fields as $i => $category ) {
foreach ( $category as $key => $label ) {
$fields[ $i ][ $key ] = $label .= ' (' . $key . ')';
}
}
return $fields;
}
add_filter( 'wpf_get_setting_crm_fields', 'add_field_keys_to_names' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment