function shortcode_wpgeo_mashup($atts, $content = null) { // Original function by RavanH (updated by Ben) // See http://wordpress.org/extend/plugins/wp-geo-mashup-map/ global $wpgeo; $wp_geo_options = get_option('wp_geo_options'); // Default attributes $map_atts = array('width' => $wp_geo_options['default_map_width'], 'height' => $wp_geo_options['default_map_height'], 'type' => $wp_geo_options['google_map_type'], 'polylines' => $wp_geo_options['show_polylines'], 'polyline_colour' => $wp_geo_options['polyline_colour'], 'align' => 'none', 'numberposts' => -1, 'posts_per_page' => -1, 'post_type' => null, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'DESC', 'markers' => 'large'); extract(shortcode_atts($map_atts, $atts)); if (!is_feed() && isset($wpgeo) && $wpgeo->show_maps() && $wpgeo->checkGoogleAPIKey()) { return get_wpgeo_map($atts); } else { return ''; } }
function shortcode_wpgeo_mashup($atts, $content = null) { global $wpgeo; $wp_geo_options = get_option('wp_geo_options'); $atts = wp_parse_args($atts, array('width' => $wp_geo_options['default_map_width'], 'height' => $wp_geo_options['default_map_height'], 'type' => $wp_geo_options['google_map_type'], 'polylines' => $wp_geo_options['show_polylines'], 'polyline_colour' => $wp_geo_options['polyline_colour'], 'align' => 'none', 'numberposts' => -1, 'posts_per_page' => -1, 'post_ids' => null, 'post_type' => null, 'post_status' => 'publish', 'orderby' => 'post_date', 'order' => 'DESC', 'markers' => 'large')); if (!is_feed() && isset($wpgeo) && $wpgeo->show_maps() && $wpgeo->checkGoogleAPIKey()) { return get_wpgeo_map($atts); } return ''; }
/** * WP Geo Map * * @param array $query Query args. * @param array $options Options array. * @return string Output. */ function wpgeo_map($query, $options = null) { echo get_wpgeo_map($query, $options); }