开发者 |
gyrus
adriantoll saurabhshukla |
---|---|
更新时间 | 2019年5月7日 21:36 |
捐献地址: | 去捐款 |
PHP版本: | 3.5 及以上 |
WordPress版本: | 5.1.1 |
developers-custom-fields
directory into the /wp-content/plugins/
directoryslt_cf_register_box
(full documentation at sltaylor.co.uknull
slt_cf_file_select_button_enqueue()
slt_cf_gmap
handling of new $location_markers
integer defaultuser_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 optionslocation_marker
field parameter to accept integers, to control how many markers can be set (default is one)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 markersjquery-ui-autocomplete
even if Use Google Libraries is presentdcf_query_string_matching
flags for WP_Query
, to control how multiple values for single query vars are matchedslt_cf_file_select_button_enqueue()
, for using file select button outside this pluginmake_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.esc_url()
around uses of add_query_arg()
file
field type and slt_cf_file_select_button
function to use WP 3.5+ media upload APIfile_restrict_to_type
parameter for file upload fieldsfile_dialog_title
parameter for file upload fieldsfile_removeable
to work server-side instead of client side wiping of hidden input valuetabindex
parameter$field
as parameter for slt_cf_checkboxes_thumbnail_size
filter0
as null
SLT_CF_GMAPS_API_KEY
wp_get_attachment_image_src()
array elements not able to be referenced directlycheckboxes_thumbnail
parameter, to include a thumbnail when listing image attachments with multiple checkboxesslt_cf_checkboxes_thumbnail_size
filtercolorpicker
field type, using http://www.eyecon.ro/colorpickergroup_by_post_type
parameter, to group multiple post type queries by post typeattachments_list
field typeslt_cf_attachments_list_query
filterscope
parameterforce-all
to just use a field for sorting, not selectingabbreviate_option_labels
field parametersortable
parameter for multiple checkboxesslt_cf_default_id()
[PARENT_ID]
option query placeholderslt_cf_strip_prefix()
slt-cf-gmaps.min.js
(this was omitted from 0.8 and resulted in the geocoder fixes not being active on live sites)datepicker_css_url
setting, to account for additional UI elements, is now ui_css_url
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
filterfile
time
and datetime
field types (thanks saurabhshukla!)slt_cf_default_value
filterslt_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.htmledit_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!)single
is set to false
and no value is selected (thanks Dave Kellam!)allowed_html
field parameter; text field sanitization is now based on using wp_kses
and testing for the unfiltered_html
user capabilityallowtags
field parameter is now deprecatedslt_cf_gmap
that failed to initialize properly when called via shortcode in a loopwysiwyg
field to use new wp_editor
function; also included wysiwyg_settings
parameter to be passed to wp_editor
(thanks katoen!)slt_cf_default_id
- now it tries to get ID of author whose archive page is being shown firstslt_cf_init_options
; new version in upgrade wasn't being storedSLT_CF_USE_GMAPS
is set to true
terms
as an options_type
for populating multiple value fields with taxonomy termsautop
parameter to slt_cf_simple_formatting
functionscope
parameter default to an empty array, which will apply the field to all items within the box's scopenotice
field type for text-only notices to the userslt_cf_gmap
so you can pass the name of the field without the prefix, which will be automatically addedabove-content
setting for the box context
parameterexcept_posts
and except_users
options to the scope
field parameterslt_cf_get_field_names
function$multiple_fields
parameter to slt_cf_all_field_values
function, to deal with values stored in multiple fields$file_attach_to_post
parameter for file
field typesgmap
option scrollwheel
to false (to prevent accidental zooming when scrolling the page)SLT_CF_USE_GMAPS
and SLT_CF_USE_FILE_SELECT
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/slt_cf_init
hook; changed initialization to allow dependent plugins to hook inslt_cf_get_current_fields
slt_cf_check_scope
functiongmap
field typesingle
field parameter, to allow storing multiple-choice values in separate postmeta fields instead of in a serialized array - this is for easier meta_query
matchingtemplate
option for the field scope
parameter, to match page templatesslt_cf_reverse_date
functionslt_cf_pre_save
action hook$to_timestamp
parameter for slt_cf_reverse_date
functionoptions_query
default to include posts_per_page=-1
is included in query if not specifiedget_users
functionscope
parameter for fields requiredslt_cf_get_posts_by_custom_first
functionrequired
, so the empty option isn't included for multiple selectsdescription
parameter for boxes[TERM_IDS]
placeholderno_options
parameter for fieldsexclude_current
parameter for fieldsfile
field type to use SLT File Select plugin (with interface to Media Library)file_button_label
and file_removeable
parameters for fieldsslt_cf_display_post
checks to exclude link and comment screens in case custom post types 'link' or 'comment' are registeredprefix
and suffix
have been renamed input_prefix
and input_suffix
required
and empty_option_text
settings for fieldsshow_user_profile
and edit_user_profile
actions, to let other plugins (e.g. User Photo) put their bits in the 'About the user'-headed sectionslt_cf_field_key
functionslt_cf_all_field_values
functionslt_cf_populate_options
filter for custom option typesprefix
and suffix
settings for fieldsslt_cf_default_id
function for better default ID handlingOBJECT_ID
placeholder for options_query
optgroup
tag when an options value is zero (thanks Daniele!)slt_cf_check_scope
handlinggroup_options
setting for fieldsslt_cf_check_scope
and slt_cf_pre_save_value
filter hooksusers
value for options_type
, to populate a field with usersslt_cf_field_value
css_url
setting to override default styles