Function Reference: geodir_custom_field_adminhtml
Summary
Adds admin html for custom fields.
Global Values
- $wpdb
- (object) (required) WordPress Database object.
- Default: None
Package
GeoDirectory
Parameters
- $field_type
- (string) (required) The form field type.
- Default: None
- $result_str
- (object|int) (required) The custom field results object or row id.
- Default: None
- $field_ins_upd
- (string) (required) When set to “submit” displays form.
- Default: None
- $field_type_key
- (string) (required) The key of the custom field.
- Default: None
Change Log
Since: 1.0.0
Source File
geodir_custom_field_adminhtml() is located in geodirectory-functions/custom_fields_functions.php [Line: 165]
Source Code
function geodir_custom_field_adminhtml($field_type, $result_str, $field_ins_upd = '', $field_type_key ='') { global $wpdb; $cf = $result_str; if (!is_object($cf)) { $field_info = $wpdb->get_row($wpdb->prepare("select * from " . GEODIR_CUSTOM_FIELDS_TABLE . " where id= %d", array($cf))); } else { $field_info = $cf; $result_str = $cf->id; } /** * Contains custom field html. * * @since 1.0.0 */ include('custom_field_html.php'); }