gmb_localized_data

The Maps Builder gmb localized data hook.

Description

apply_filters( 'gmb_localized_data', (array) $all_meta_gmb_zoom_0 ); 

Parameters (1)

0. $all_meta_gmb_zoom_0 — Optional. (array) => array( $post->ID => array( 'id' => $atts['id'], 'map_params' => array( 'title' => $post->post_title, 'width' => $visual_info['width'], 'height' => $visual_info['height'], 'latitude' => $lat_lng['latitude'], 'longitude' => $lat_lng['longitude'], 'zoom' => ! empty( $all_meta['gmb_zoom'][0] ) ? $all_meta['gmb_zoom'][0] : '15', 'default_marker' => apply_filters( 'gmb_default_marker', GMB_PLUGIN_URL . 'assets/img/spotlight-poi.png' ), ), 'map_controls' => array( 'zoom_control' => ! empty( $all_meta['gmb_zoom_control'][0] ) ? strtoupper( $all_meta['gmb_zoom_control'][0] ) : 'STANDARD', 'pan_control' => ! empty( $all_meta['gmb_pan'][0] ) ? $all_meta['gmb_pan'][0] : 'none', 'map_type_control' => ! empty( $all_meta['gmb_map_type_control'][0] ) ? $all_meta['gmb_map_type_control'][0] : 'none', 'draggable' => ! empty( $all_meta['gmb_draggable'][0] ) ? $all_meta['gmb_draggable'][0] : 'none', 'double_click_zoom' => ! empty( $all_meta['gmb_double_click'][0] ) ? $all_meta['gmb_double_click'][0] : 'none', 'wheel_zoom' => ! empty( $all_meta['gmb_wheel_zoom'][0] ) ? $all_meta['gmb_wheel_zoom'][0] : 'none', 'street_view' => ! empty( $all_meta['gmb_street_view'][0] ) ? $all_meta['gmb_street_view'][0] : 'none', ), 'map_theme' => array( 'map_type' => ! empty( $all_meta['gmb_type'][0] ) ? $all_meta['gmb_type'][0] : 'RoadMap', 'map_theme_json' => ! empty( $all_meta['gmb_theme_json'][0] ) ? $all_meta['gmb_theme_json'][0] : 'none',), 'map_markers' => $map_marker_array, 'plugin_url' => GMB_PLUGIN_URL, 'places_api' => array( 'show_places' => ! empty( $all_meta['gmb_show_places'][0] ) ? $all_meta['gmb_show_places'][0] : 'no', 'search_radius' => ! empty( $all_meta['gmb_search_radius'][0] ) ? $all_meta['gmb_search_radius'][0] : '3000', 'search_places' => ! empty( $all_meta['gmb_places_search_multicheckbox'][0] ) ? maybe_unserialize( $all_meta['gmb_places_search_multicheckbox'][0] ) : '', ), 'map_markers_icon' => ! empty( $all_meta['gmb_map_marker'] ) ? $all_meta['gmb_map_marker'][0] : 'none', ) )
The array.

Usage

To run the hook, copy the example below.
  1. $all_meta_gmb_zoom_0 = apply_filters( 'gmb_localized_data', $all_meta_gmb_zoom_0 ); 
  2.  
  3. if ( !empty( $all_meta_gmb_zoom_0 ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gmb_localized_data callback 
  2. function filter_gmb_localized_data( $all_meta_gmb_zoom_0 ) { 
  3. // make filter magic happen here... 
  4. return $all_meta_gmb_zoom_0
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'gmb_localized_data', 'filter_gmb_localized_data', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'gmb_localized_data', 'filter_gmb_localized_data', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/class-gmb-engine.php  
  1. $localized_data = apply_filters( 'gmb_localized_data', array(