Function Reference: geodir_custom_selected_fields

Summary

Adds admin html for custom fields selected fields.

Global Values

$wpdb
(object) (required) WordPress Database object.

Default: None

Package

GeoDirectory

Change Log

Since: 1.0.0

Source File

geodir_custom_selected_fields() is located in geodirectory-admin/admin_hooks_actions.php [Line: 786]

Source Code

function geodir_custom_selected_fields()
{
    $listing_type = ($_REQUEST['listing_type'] != '') ? sanitize_text_field($_REQUEST['listing_type']) : 'gd_place';
    ?>
    
    
    get_results($wpdb->prepare("SELECT * FROM " . GEODIR_CUSTOM_FIELDS_TABLE . " WHERE post_type = %s ORDER BY sort_order ASC", array($listing_type))); if (!empty($fields)) { foreach ($fields as $field) { //$result_str = $field->id; $result_str = $field; $field_type = $field->field_type; $field_type_key = $field->field_type_key; $field_ins_upd = 'display'; geodir_custom_field_adminhtml($field_type, $result_str, $field_ins_upd,$field_type_key); } } ?>