From 1e61535580b27f16a4bd7dd10110f48ca74e73d7 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@1584 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 8e96d544be..0e8c78d0aa 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) {