Plugin Directory

Developer's Custom Fields

Provides developers with powerful and flexible tools for managing post and user custom fields.

1.3.1 (2015-08-25)

  • Fixed issue with slt_cf_gmap handling of new $location_markers integer default


  • user_new_form hook used to add fields to new user form (to include fields in new user form, set scope as per including them in registration form, e.g. array( 'registration', 'subscriber' ) - the latter being the default user role)
  • group_by_post_type now includes option group label even if there's only one post type in the options
  • Changed location_marker field parameter to accept integers, to control how many markers can be set (default is one)
  • Google Maps JavaScript: Reworked code for more efficiency, prevent addition of more markers to a map than set in location_marker, variable instructions based on maximum number of markers, geocode moves single map marker (as in previous single-marker releases) or adds new markers on maps with multiple markers
  • Fix to enqueue jquery-ui-autocomplete even if Use Google Libraries is present


  • Changed admin notices so they only show for admins


  • Better version suffixes for styles


  • Changed Google maps integration to allow multiple markers (thanks adriantoll!) - please read the release notes
  • Changed query filtering for Simple Events date fields to use WP 4.1+ syntax to better handle start and end dates
  • Added dcf_query_string_matching flags for WP_Query, to control how multiple values for single query vars are matched
  • Added dismissable admin notices based on new version warnings file


  • Fixed issue with max-width: 100% messing up Google controls


  • Added slt_cf_file_select_button_enqueue(), for using file select button outside this plugin
  • Added ability to automatically manage query string vars for custom queries, with the make_query_var field parameter, and the dcf_use_query_string and dcf_custom_field_query_vars_only flags for WP_Query. Includes integration with Simple Events date field.
  • Added esc_url() around uses of add_query_arg()
  • Added management of 'term splitting' for WordPress 4.2 - not activated by default, please read the release notes
  • Added version-specific update warnings functionality


  • Made plugin translatable
  • Added Serbian translation (thanks Ogi Djuraskovic!)


  • Dropped support for WP < 3.5 (please update WP, or stick with DCF 0.9.1 if you really have to!)
  • Updated file field type and slt_cf_file_select_button function to use WP 3.5+ media upload API
  • Added file_restrict_to_type parameter for file upload fields
  • Added file_dialog_title parameter for file upload fields
  • Changed file_removeable to work server-side instead of client side wiping of hidden input value
  • Added tabindex parameter
  • Added $field as parameter for slt_cf_checkboxes_thumbnail_size filter
  • Added post formats to scoping
  • Fixed small bug in all post meta output box, which showed 0 as null
  • Added Google Maps API key support with SLT_CF_GMAPS_API_KEY


  • Fix for conflict with other plugins that add media upload buttons to taxonomies (thanks juicboxint!)
  • Fix for wp_get_attachment_image_src() array elements not able to be referenced directly
  • Added checkboxes_thumbnail parameter, to include a thumbnail when listing image attachments with multiple checkboxes
  • Added slt_cf_checkboxes_thumbnail_size filter
  • Added colorpicker field type, using http://www.eyecon.ro/colorpicker


  • Fixed issue with sortable checkboxes where new options don't appear in list
  • Added group_by_post_type parameter, to group multiple post type queries by post type
  • Added attachments_list field type
  • Added slt_cf_attachments_list_query filter
  • Improved file preview icon handling for file types without an icon
  • User fields can now be added to the registration form - see the docs for the scope parameter
  • Sortable checkboxes can now set default to force-all to just use a field for sorting, not selecting
  • Retired "0.7 cleanup" and other redundant database tools
  • Fixed "remove old fields" database tool
  • Better enqueueing of scripts and styles
  • Test to delete empty values changed to exactly match empty strings (numeric 0 gets stored)


  • Added abbreviate_option_labels field parameter
  • Added sortable parameter for multiple checkboxes
  • Fixed error in handling default ID, depending on context (admin / front-end) in slt_cf_default_id()
  • Using LESS for CSS

  • Fixed minor bug in new placeholder code that was causing issues with option queries


  • Added [PARENT_ID] option query placeholder
  • Revamped option query placeholder checking to allow for values inside array parameters


  • Added post meta output (inspired by Post Meta Inspector plugin)


  • Added slt_cf_strip_prefix()
  • Added more hooks to allow some standard functions to be overtaken
  • Updated slt-cf-gmaps.min.js (this was omitted from 0.8 and resulted in the geocoder fixes not being active on live sites)


  • NOTE: The datepicker_css_url setting, to account for additional UI elements, is now ui_css_url
  • NOTE: The defaults for the ui_css_url and css_url settings have been moved inside the slt_cf_init function. If these values are being changed by the slt_cf_setting function, this must be hooked to init with a priority of 11 or above to ensure they aren't re-set to the defaults. These defaults have been moved inside slt_cf_init because they use plugins_url. Now they are exposed to any filters that other plugins might attach to the plugins_url filter
  • Added support for WordPress 3.5 media handling; attachments now accept all custom field types except file
  • Added time and datetime field types (thanks saurabhshukla!)
  • Added slt_cf_default_value filter
  • Fixed issue with deleting a cleared text field on an attachment (thanks Sean Hawkridge!)
  • Minor fixes to dynamic options data initialization
  • Adjusted output of box and field descriptions to fit with user profile screen markup better
  • Made geocoder bounds update when map bounds change so only addresses / locations from within the current map display are suggested
  • Moved enqueuing of Google maps JS inside the slt_cf_gmap() function, so the scripts are only used where necessary. This is made possible by registering them to be included in the footer - see http://scribu.net/wordpress/conditional-script-loading-revisited.html
  • Added version numbers to scripts to prevent caching issues in future versions
  • Improved PHPDocs for key functions to aid development

  • Changed the way the file select JS detects being inside the Media Library overlay, in order to be compatible with the Inline Attachments plugin
  • Added the edit_on_profile flag, to signal that even if a user doesn't have the right capabilities to edit a user profile field, they can edit it on their own profile (thanks jbalyo!)
  • Improved error messages
  • Fixed init errors when creating a post and there's no post ID
  • Code now on GitHub!

  • Fixed a bug in checkbox / select fields where single is set to false and no value is selected (thanks Dave Kellam!)


  • Made the Gmap 'Find an address' geocoder work with 3.3's inclusion of jQuery UI autocomplete
  • Made File Select functionality compatible with new WP 3.3 Plupload interface
  • Added allowed_html field parameter; text field sanitization is now based on using wp_kses and testing for the unfiltered_html user capability
  • The allowtags field parameter is now deprecated
  • Fixed bug in slt_cf_gmap that failed to initialize properly when called via shortcode in a loop


  • For 3.3 and above, switched inclusion of wysiwyg field to use new wp_editor function; also included wysiwyg_settings parameter to be passed to wp_editor (thanks katoen!)
  • Changed the way the user ID is set up in slt_cf_default_id - now it tries to get ID of author whose archive page is being shown first
  • Fixed bug in slt_cf_init_options; new version in upgrade wasn't being stored
  • Fixed problem with Gmap shortcode not working even when SLT_CF_USE_GMAPS is set to true


  • Added terms as an options_type for populating multiple value fields with taxonomy terms
  • Added autop parameter to slt_cf_simple_formatting function
  • Fields are only created when there's a value to enter; when there's an empty value, fields are deleted
  • Made the field scope parameter default to an empty array, which will apply the field to all items within the box's scope
  • Added notice field type for text-only notices to the user
  • Changed slt_cf_gmap so you can pass the name of the field without the prefix, which will be automatically added
  • Added an above-content setting for the box context parameter
  • Added except_posts and except_users options to the scope field parameter
  • Added admin menu for database clean-up operations
  • Added slt_cf_get_field_names function
  • Added $multiple_fields parameter to slt_cf_all_field_values function, to deal with values stored in multiple fields
  • Added $file_attach_to_post parameter for file field types
  • Set the gmap option scrollwheel to false (to prevent accidental zooming when scrolling the page)
  • Changed internal file naming
  • Upgraded jQuery UI Datepicker to 1.8.16
  • Included the admin gmap geoencoder field via JS, on the condition that jQuery autocomplete is present (until we switch to suggest)
  • Minified JS and CSS (full versions loaded when SCRIPT_DEBUG is true)
  • Moved documentation to http://sltaylor.co.uk/wordpress/developers-custom-fields-docs/
  • Issue tracking at https://github.com/gyrus/WordPress-Developers-Custom-Fields/issues


  • Fixed bug where fields init check for capability to edit was being applied when a Google Map is displayed on the front end, so anyone not able to edit the field, including anyone not logged in, can't see the map
  • Fixed syntax bug in calls to textile formatting function
  • Made sure absent (unchecked) single checkboxes have a boolean false value stored, to avoid something that defaults to true getting re-checked after it's been unchecked
  • Changed single checkboxes to store value as "1" and "0" instead of "yes" and "no" ("0" evaluates to false, but "no" evaluates to true!)


  • Added attachment as an possible value of the box type parameter - custom fields for attachments! (Though accepted field types are limited to text and select for now.) Includes many minor changes to plugin code. Thanks to Frank at http://wpengineer.com/2076/add-custom-field-attachment-in-wordpress/
  • Added slt_cf_init hook; changed initialization to allow dependent plugins to hook in
  • Added slt_cf_get_current_fields
  • Branched scope checking out from initialization code into separate slt_cf_check_scope function
  • Added gmap field type
  • Folded the functionality from the SLT File Select plugin into this plugin's code, leaving the functionality exposed for use in theme options pages etc.
  • Added single field parameter, to allow storing multiple-choice values in separate postmeta fields instead of in a serialized array - this is for easier meta_query matching
  • Added template option for the field scope parameter, to match page templates
  • Added ctype functions for better validation
  • Added slt_cf_reverse_date function
  • Added slt_cf_pre_save action hook
  • Added $to_timestamp parameter for slt_cf_reverse_date function


  • Adjusted options_query default to include posts_per_page=-1 is included in query if not specified


  • Changed selection of users to use new WP 3.1 get_users function
  • Made the scope parameter for fields required
  • Added parameter type validation


  • Added slt_cf_get_posts_by_custom_first function
  • Changed behaviour of required, so the empty option isn't included for multiple selects
  • Added description parameter for boxes
  • Added [TERM_IDS] placeholder
  • Added "No options" alert and no_options parameter for fields
  • Added exclude_current parameter for fields
  • Changed file field type to use SLT File Select plugin (with interface to Media Library)
  • Added file_button_label and file_removeable parameters for fields
  • Changed the way slt_cf_display_post checks to exclude link and comment screens in case custom post types 'link' or 'comment' are registered


  • Fixed display of block labels when width is set (thanks Daniele!)
  • Empty option only displayed for non-static selects (thanks Daniele!)
  • A bunch of changes to how input prefixes and suffixes are handled (thanks again Daniele!)
  • For clarity, the field settings prefix and suffix have been renamed input_prefix and input_suffix


  • Added required and empty_option_text settings for fields


  • Decreased priority of show_user_profile and edit_user_profile actions, to let other plugins (e.g. User Photo) put their bits in the 'About the user'-headed section
  • Added slt_cf_field_key function
  • Added slt_cf_all_field_values function
  • Added slt_cf_populate_options filter for custom option types
  • Added prefix and suffix settings for fields
  • Added slt_cf_default_id function for better default ID handling
  • Changed datepicker formatting setting so it can be overridden on a per-field basis
  • Added OBJECT_ID placeholder for options_query
  • Fixed bug that creates an optgroup tag when an options value is zero (thanks Daniele!)


  • Fixed an error in slt_cf_check_scope handling


  • Added support for assigning fields to posts with certain taxonomy terms assigned to them
  • Added group_options setting for fields
  • Added jQuery datepicker for date field type
  • Altered interaction with AJAX requests to prevent 'undefined function' errors
  • Added slt_cf_check_scope and slt_cf_pre_save_value filter hooks
  • New built-in scope matches against post or user IDs
  • Multiple values allowed for box type


  • Added support for user profile custom fields
  • Added check for duplicate field names in post meta boxes
  • Improved initialization and interaction with hooks
  • Added users value for options_type, to populate a field with users
  • Added output options for slt_cf_field_value
  • Added css_url setting to override default styles


  • First version

Requires: 3.5 or higher
Compatible up to: 4.3.6
Last Updated: 1 year ago
Active Installs: 1,000+


5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,3,3 100,3,3 100,3,3 100,1,1 100,2,2
100,2,2 100,2,2