From c7c191ed190e7268c532bb0e378d9e7a7c2658d4 Mon Sep 17 00:00:00 2001 From: rboren Date: Fri, 3 Sep 2004 04:29:11 +0000 Subject: [PATCH] Send Geo Url Header only if use_geo_positions is set. Bug 242. Patch from 2fargon. git-svn-id: http://svn.automattic.com/wordpress/trunk@1584 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 42 ++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 8e96d544b..0e8c78d0a 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -834,26 +834,28 @@ include_once (ABSPATH . WPINC . '/class-xmlrpcs.php'); function doGeoUrlHeader($post_list = '') { global $posts; - if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) { - // there's only one result see if it has a geo code - $row = $posts[0]; - $lat = $row->post_lat; - $lon = $row->post_lon; - $title = $row->post_title; - if(($lon != null) && ($lat != null) ) { - echo "\n"; - echo "\n"; - echo "\n"; - return; - } - } else { - if(get_settings('use_default_geourl')) { - // send the default here - echo "\n"; - echo "\n"; - echo "\n"; - } - } + if (get_settings('use_geo_positions')) { + if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) { + // there's only one result see if it has a geo code + $row = $posts[0]; + $lat = $row->post_lat; + $lon = $row->post_lon; + $title = $row->post_title; + if(($lon != null) && ($lat != null) ) { + echo "\n"; + echo "\n"; + echo "\n"; + return; + } + } else { + if(get_settings('use_default_geourl')) { + // send the default here + echo "\n"; + echo "\n"; + echo "\n"; + } + } + } } function getRemoteFile($host,$path) {