Filter Reference: geodir_custom_fields

Summary

Filter the custom fields array to be able to add or remove items.

Parameters

$custom_fields
(array) (required) {
The custom fields array to be filtered. @type string $field_type The type of field, eg: text, datepicker, textarea, time, checkbox, phone, radio, email, select, multiselect, url, html, file. @type string $class The class for the field in backend. @type string $icon Can be font-awesome class name or icon image url. @type string $name The name of the field. @type string $description A short description about the field. @type array $defaults {
Optional. Used to set the default value of the field. @type string data_type The SQL data type for the field. VARCHAR, TEXT, TIME, TINYINT, INT, FLOAT, DATE
@type int decimal_point limit if using FLOAT data_type
@type string admin_title The admin title for the field. @type string site_title This will be the title for the field on the frontend. @type string admin_desc This will be shown below the field on the add listing form. @type string htmlvar_name This is a unique identifier used in the HTML, it MUST NOT contain spaces or special characters. @type bool is_active If false the field will not be displayed anywhere. @type bool for_admin_use If true then only site admin can see and edit this field. @type string default_value The default value for the input on the add listing page. @type string show_in The locations to show in. [detail],[moreinfo],[listing],[owntab],[mapbubble]
@type bool is_required If true the field will be required on the add listing page. @type string option_values The option values for select and multiselect only
@type string validation_pattern HTML5 validation pattern (text input only by default). @type string validation_msg HTML5 validation message (text input only by default). @type string required_msg Required warning message. @type string field_icon Icon url or font awesome class. @type string css_class Field custom css class for field custom style. @type bool cat_sort If true the field will appear in the category sort options, if false the field will be hidden, leave blank to show option. @type bool cat_sort If true the field will appear in the advanced search sort options, if false the field will be hidden, leave blank to show option. (advanced search addon required)
}
}.

Default: None
$post_type
(string) (required) The post type requested.

Default: None

Change Log

Since: 1.6.6

Used by

geodirectory-admin/admin_hooks_actions.php: geodir_custom_fields() [Line: 688]

Source Code

    return apply_filters('geodir_custom_fields',$custom_fields,$post_type);