Function Reference: geodir_detail_page_tab_headings_change
Summary
Detail Page Tab Headings Change.
Global Values
- $wpdb
- (object) (required) WordPress Database object.
- Default: None
Package
GeoDirectory
Parameters
- $tabs_arr
- (array) (required) {
Attributes of the Tabs array. @type array $post_profile {
Attributes of post_profile. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default true. @type bool $is_display Display this tab? Default true. @type string $tab_content Tab content. }
@type array $post_info {
Attributes of post_info. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default false. @type string $tab_content Tab content. }
@type array $post_images {
Attributes of post_images. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default true. @type string $tab_content Tab content. }
@type array $post_video {
Attributes of post_video. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default false. @type string $tab_content Tab content. }
@type array $special_offers {
Attributes of special_offers. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default false. @type string $tab_content Tab content. }
@type array $post_map {
Attributes of post_map. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default true. @type string $tab_content Tab content. }
@type array $reviews {
Attributes of reviews. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default true. @type string $tab_content Tab content. }
@type array $related_listing {
Attributes of related_listing. @type string $heading_text Tab Heading. @type bool $is_active_tab Is this tab active? Default false. @type bool $is_display Display this tab? Default true. @type string $tab_content Tab content. }}.
- Default: “”
Return Values
- (array)
- Modified tabs array.
Change Log
Since: 1.0.0
Source File
geodir_detail_page_tab_headings_change() is located in geodirectory_hooks_actions.php [Line: 2128]
Source Code
function geodir_detail_page_tab_headings_change($tabs_arr) { global $wpdb; $post_type = geodir_get_current_posttype(); $all_postypes = geodir_get_posttypes(); if (!empty($tabs_arr) && $post_type != '' && in_array($post_type, $all_postypes)) { if (array_key_exists('post_video', $tabs_arr)) { $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_video', $post_type))); if (isset($tabs_arr['post_video']['heading_text']) && $field_title != '') $tabs_arr['post_video']['heading_text'] = $field_title; } if (array_key_exists('special_offers', $tabs_arr)) { $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_special_offers', $post_type))); if (isset($tabs_arr['special_offers']['heading_text']) && $field_title != '') $tabs_arr['special_offers']['heading_text'] = $field_title; } } return $tabs_arr; }