/ Published in: PHP

Some hosting configurations do uncontrollable redirects and other oddities that play havoc with Geo Mashup maps. Most commonly the home URL redirects improperly unless a slash is added at the end. This code attempts to add the slash just for Geo Mashup. Put it in a theme functions.php or in mu-plugins.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
class CustomGeoMashupWrap { static function add_slash_to_home_url( $url, $path, $scheme, $blog ) { return trailingslashit( $url ); } static function map_shortcode_wrapper( $args ) { $map = GeoMashup::map( $args ); return $map; } function wrap_map_shortcode() { remove_shortcode( 'geo_mashup_map' ); } }
URL: http://wordpress-geo-mashup.googlecode.com/
Comments
