Function Reference: geodir_googlemap_script_extra_details_page
Summary
Add extra fields to google maps script call.
Global Values
- $post
- (object) (required) The current post object.
- Default: None
Package
GeoDirectory
Parameters
- $extra
- (string) (required) Old extra string.
- Default: None
Return Values
- (string)
- Modified extra string.
Change Log
Since: 1.0.0
Source File
geodir_googlemap_script_extra_details_page() is located in geodirectory-functions/general_functions.php [Line: 2837]
Source Code
function geodir_googlemap_script_extra_details_page( $extra ) { global $post; $add_google_places_api = false; if ( isset( $post->post_content ) && has_shortcode( $post->post_content, 'gd_add_listing' ) ) { $add_google_places_api = true; } if ( ! str_replace( 'libraries=places', '', $extra ) && ( geodir_is_page( 'detail' ) || $add_google_places_api ) ) { $extra .= "&libraries=places"; } return $extra; }