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
This commit is contained in:
parent
33d4b98278
commit
c7c191ed19
|
@ -834,26 +834,28 @@ include_once (ABSPATH . WPINC . '/class-xmlrpcs.php');
|
||||||
function doGeoUrlHeader($post_list = '') {
|
function doGeoUrlHeader($post_list = '') {
|
||||||
global $posts;
|
global $posts;
|
||||||
|
|
||||||
if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) {
|
if (get_settings('use_geo_positions')) {
|
||||||
// there's only one result see if it has a geo code
|
if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) {
|
||||||
$row = $posts[0];
|
// there's only one result see if it has a geo code
|
||||||
$lat = $row->post_lat;
|
$row = $posts[0];
|
||||||
$lon = $row->post_lon;
|
$lat = $row->post_lat;
|
||||||
$title = $row->post_title;
|
$lon = $row->post_lon;
|
||||||
if(($lon != null) && ($lat != null) ) {
|
$title = $row->post_title;
|
||||||
echo "<meta name=\"ICBM\" content=\"".$lat.", ".$lon."\" />\n";
|
if(($lon != null) && ($lat != null) ) {
|
||||||
echo "<meta name=\"DC.title\" content=\"".convert_chars(strip_tags(htmlspecialchars(get_bloginfo("name"))))." - ".$title."\" />\n";
|
echo "<meta name=\"ICBM\" content=\"".$lat.", ".$lon."\" />\n";
|
||||||
echo "<meta name=\"geo.position\" content=\"".$lat.";".$lon."\" />\n";
|
echo "<meta name=\"DC.title\" content=\"".convert_chars(strip_tags(htmlspecialchars(get_bloginfo("name"))))." - ".$title."\" />\n";
|
||||||
return;
|
echo "<meta name=\"geo.position\" content=\"".$lat.";".$lon."\" />\n";
|
||||||
}
|
return;
|
||||||
} else {
|
}
|
||||||
if(get_settings('use_default_geourl')) {
|
} else {
|
||||||
// send the default here
|
if(get_settings('use_default_geourl')) {
|
||||||
echo "<meta name='ICBM' content=\"". get_settings('default_geourl_lat') .", ". get_settings('default_geourl_lon') ."\" />\n";
|
// send the default here
|
||||||
echo "<meta name='DC.title' content=\"".convert_chars(strip_tags(htmlspecialchars(get_bloginfo("name"))))."\" />\n";
|
echo "<meta name='ICBM' content=\"". get_settings('default_geourl_lat') .", ". get_settings('default_geourl_lon') ."\" />\n";
|
||||||
echo "<meta name='geo.position' content=\"". get_settings('default_geourl_lat') .";". get_settings('default_geourl_lon') ."\" />\n";
|
echo "<meta name='DC.title' content=\"".convert_chars(strip_tags(htmlspecialchars(get_bloginfo("name"))))."\" />\n";
|
||||||
}
|
echo "<meta name='geo.position' content=\"". get_settings('default_geourl_lat') .";". get_settings('default_geourl_lon') ."\" />\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRemoteFile($host,$path) {
|
function getRemoteFile($host,$path) {
|
||||||
|
|
Loading…
Reference in New Issue