function geopress_map_loop($width = "", $height = "", $locations = -1, $zoom_level = -1) { return geopress_map($height, $width, $locations, false, true, $zoom_level); }
function embed_map_inpost($content) { $default_add_map = get_settings('_geopress_default_add_map', true); // If the user explicitly wants to insert a map if (preg_match_all('/INSERT_MAP/', $content, $matches) > 0) { $content = preg_replace("/INSERT_MAP\\((\\d+),[ ]?(\\d+)\\)/", geopress_post_map('\\1', '\\2'), $content); $content = preg_replace("/INSERT_OVERLAY_MAP\\((\\d+),[ ]?(\\d+),[ ]?(.+)\\)/", geopress_post_map('\\1', '\\2', true, '\\3'), $content); $content = preg_replace("/INSERT_MAP/", geopress_post_map(), $content); // This can probably be made into a single preg_replace with ? optionals - ajturner // } elseif (preg_match_all('/INSERT_GEOPRESS_MAP/', $content, $matches) > 0) { $content = preg_replace("/INSERT_GEOPRESS_MAP\\((\\d+),[ ]?(\\d+)\\)/", geopress_map('\\1', '\\2'), $content); $content = preg_replace("/INSERT_GEOPRESS_MAP/", geopress_map(), $content); // This can probably be made into a single preg_replace with ? optionals - ajturner // } elseif ($default_add_map == 2 || is_single() && $default_add_map == 1) { // Add a map to the end of the post if "automatically add map" is enabled $content .= geopress_post_map(); } $content = preg_replace("/GEOPRESS_LOCATION\\((.+)\\)/", "", $content); return $content; }