http://stackoverflow.com/questions/7549669/php-validate-latitude-longitude-strings-in-decimal-format */ if (!preg_match("/^[-]?(([0-8]?[0-9])\.(\d+))|(90(\.0+)?)$/", $agm_options['map_Lat'])) { echo "
Nothing saved, Invalid Latitude Value.
"; } elseif (!preg_match("/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\.(\d+))|180(\.0+)?)$/", $agm_options['map_Lng'])) { echo "
Nothing saved, Invalid Longitude Value.
"; } elseif (strlen($agm_options['info_text']) <= 1000) { /* Save posted data back to database */ update_option('ank_google_map', $agm_options); echo "

Your settings has been saved. You can always use [ank_google_map] shortcode.

"; } else { echo "
Nothing saved, Info Window Text should not exceed 1000 characters . Current Length is: " . strlen($agm_options['info_text']) . "
"; } /* * Detect if cache is enabled and warn user to flush cache */ if(WP_CACHE){ echo "
It seems that a caching/performance plugin is active on this site. Please manually invalidate/flush that plugin cache to reflect any settings you saved here.
"; } } /* * * Display notice if current wp installation does not support color picker */ if(version_compare($GLOBALS['wp_version'],'3.5','<')){ echo "
Color Picker won't work here. Please upgrade your WordPress to latest (v3.5+).
"; } ?>

Ank Google Map Settings

Map Canvas Options

Map Canvas Width: Choose % (percent) to make it responsive
Map Canvas Height: Height will be in px
Border Color: Border will be 1px solid.

Configure Map Options

Latitude:
Quick Tip: Right click on this map to set new Latitude and Longitude values.
You can also drag marker to your desired location to set that point as the new center of map.
Longitude:
Zoom Level:
Disable Controls: type="checkbox" name="map_control_1" id="map_control_1">
type="checkbox" name="map_control_2" id="map_control_2">
type="checkbox" name="map_control_3" id="map_control_3">
type="checkbox" name="map_control_4" id="map_control_4">
type="checkbox" name="map_control_5" id="map_control_5">
Language Code:
Map Type:

Marker Options

Enable marker: type="checkbox" name="marker_on" id="agm_mark_on">
Marker Title: Don't use html tags here (max 200 characters)
Marker Animation:
Marker Color:

Info Window Options

Enable Info Window: type="checkbox" name="info_on" id="agm_info_on">
Info Window State: type="checkbox" name="info_state" id="agm_info_state">
Info Window Text: agm_get_editor(stripslashes($agm_options['info_text']),$agm_options['te_meta_1'],$agm_options['te_meta_2'],$agm_options['te_meta_3']);?> HTML tags are allowed, Max 1000 characters.

Created with ♥ by Ankur Kumar | View on GitHub | View on WordPress.org

Showing Debugging Info:
'; var_dump($agm_options); echo '


'; }?>