function shortcode_wpgeo_static_map($atts = null, $content = null) { global $post; $wp_geo_options = get_option('wp_geo_options'); // Validate Args $atts = wp_parse_args($atts, array('post_id' => $post->ID, 'width' => trim($wp_geo_options['default_map_width'], 'px'), 'height' => trim($wp_geo_options['default_map_height'], 'px'), 'maptype' => $wp_geo_options['google_map_type'], 'zoom' => $wp_geo_options['default_map_zoom'])); return get_wpgeo_post_static_map($atts['post_id'], $atts); }
/** * WP Geo Post Static Map * Outputs the HTML for a static post map. * * @param int $post_id (optional) Post ID. * @param array $query (optional) Parameters. */ function wpgeo_post_static_map($post_id = 0, $query = null) { echo get_wpgeo_post_static_map($post_id, $query); }