Function Reference: places_custom_fields_tab
Summary
create custom fields for place.
Package
GeoDirectory
Parameters
- $tabs
- (array) (required) {
Attributes of the tabs array. @type array $general_settings {
Attributes of general settings. @type string $label Default “General”. }
@type array $design_settings {
Attributes of design settings. @type string $label Default “Design”. }
@type array $permalink_settings {
Attributes of permalink settings. @type string $label Default “Permalinks”. }
@type array $notifications_settings {
Attributes of notifications settings. @type string $label Default “Notifications”. }
@type array $default_location_settings {
Attributes of default location settings. @type string $label Default “Set Default Location”. }}.
- Default: None
Return Values
- (array)
- Modified tabs array.
Change Log
Since: 1.0.0
Source File
places_custom_fields_tab() is located in geodirectory-admin/admin_functions.php [Line: 641]
Source Code
function places_custom_fields_tab($tabs) { $geodir_post_types = get_option('geodir_post_types'); if (!empty($geodir_post_types)) { foreach ($geodir_post_types as $geodir_post_type => $geodir_posttype_info): $listing_slug = __($geodir_posttype_info['labels']['singular_name'], 'geodirectory'); $tabs[$geodir_post_type . '_fields_settings'] = array( 'label' => wp_sprintf(__('%s Settings', 'geodirectory'), $listing_slug), 'subtabs' => array( array('subtab' => 'custom_fields', 'label' => __('Custom Fields', 'geodirectory'), 'request' => array('listing_type' => $geodir_post_type)), array('subtab' => 'sorting_options', 'label' => __('Sorting Options', 'geodirectory'), 'request' => array('listing_type' => $geodir_post_type)), ), 'tab_index' => 9, 'request' => array('listing_type' => $geodir_post_type) ); endforeach; } return $tabs; }