getLocation($ipAdd)); $coordinates = $bgmp->geocode($location->ipinfo->Location->CityData->postal_code); } else { $coordinates = $bgmp->geocode( '33131' ); } $options[ 'mapWidth' ] = 800; $options[ 'mapHeight' ] = 600; $options[ 'latitude' ] = $coordinates[ 'latitude' ]; $options[ 'longitude' ] = $coordinates[ 'longitude' ]; $options[ 'zoom' ] = 18; $options[ 'type' ] = 'ROADMAP'; $options[ 'typeControl' ] = 'HORIZONTAL_BAR'; $options[ 'navigationControl' ] = 'SMALL'; $options[ 'infoWindowMaxWidth' ] = 350; // $options[ 'categories' ] = array( 'record-stores', 'parks' ); return $options; } add_filter( 'bgmp_map-shortcode-arguments', 'setBGMPMapShortcodeArguments' ); function getIP() { $ip; if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR"); else $ip = "UNKNOWN"; return $ip; } ?>