Function Reference: geodir_cpt_detail_page_map_is_display
Summary
Filter the map should be displayed on detail page or not.
Global Values
- $post
- (WP_Post) (required) WP Post object.
- Default: current post
Parameters
- $is_display
- (bool) (required) True if map should be displayed, otherwise false.
- Default: None
- $tab
- (string) (required) The listing detail page tab.
- Default: None
Return Values
- (True)
- if map should be displayed, otherwise false.
Change Log
Since: 1.1.6
Source File
geodir_cpt_detail_page_map_is_display() is located in geodir_custom_posts/geodir_cp_functions.php [Line: 1374]
Source Code
function geodir_cpt_detail_page_map_is_display( $is_display, $tab ) { global $post; // this bit added for preview page if(isset($post->post_type) && $post->post_type){$post_type = $post->post_type;} elseif(isset($post->listing_type) && $post->listing_type){$post_type = $post->listing_type;} if ( $tab == 'post_map' && ( geodir_is_page( 'detail' ) || geodir_is_page( 'preview' ) ) && !empty( $post ) && isset( $post_type) && geodir_cpt_no_location( $post_type ) ) { $is_display = false; } return $is_display; }