This Cf7 extension for google maps is developer friendly. Developers can control on various aspect of this plugin using hooks. Below are the hooks provided in this plugin.

cf7_map_options

– Modify backend settings dynamically.

You can apply different settings on pages using this hook.


add_filter('cf7_map_options','cf7_map_options',1,2);
function cf7_map_options($options,$cf7) {
 global $post;
 
 if($post->ID == 1 ) { 
  $options['show_circle_option'] = 'false';
  $options['show_polygon_option'] = 'false';
  $options['show_polyline_option'] = 'false';
  $options['show_rectangle_option'] = 'false';
  $options['show_marker_option'] = 'true';
  $options['marker_max_limit'] = '2';	
 }

 if($post->ID == 2 ) { 
  $options['show_circle_option'] = 'false';
  $options['show_polygon_option'] = 'true';
  $options['show_polyline_option'] = 'false';
  $options['show_rectangle_option'] = 'false';
  $options['show_marker_option'] = 'false';
  $options['polygon_max_limit'] = '3';	
 }

  return $options;
}
cf7gm_shapes_data

– Modify shapes data html output in the email.

This plugin sends markers & shapes data in the html table form in the email. You can modify this html table according to your design.

add_filter('cf7gm_shapes_data','cf7gm_shapes_data',1,2);
function cf7gm_shapes_data($current_html,$shapes_data) {

    $new_html = "Below are shapes informations :-".$current_html;
    return $new_html;

}
cf7gm_script_position

– Include styles & scripts in header or footer.

This plugin includes all styles & scripts in the footer. Admin can include these scripts in header.

add_filter('cf7gm_script_position','cf7gm_script_position',1);
function cf7gm_script_position($in_footer) {

    $in_footer = false;
    return $in_footer;

}