Geo enhancements. Allow get_Lat and get_Lon to be called outside of the post loop. Add doGeoUrlHeader as an action on wp_head.

git-svn-id: https://develop.svn.wordpress.org/trunk@1179 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-04-26 02:34:07 +00:00
parent 5ab439325f
commit 21fbaa5bac
3 changed files with 26 additions and 6 deletions
+9 -3
View File
@@ -867,10 +867,16 @@ function pingback($content, $post_ID) {
debug_fclose($log);
}
function doGeoUrlHeader($posts) {
if (count($posts) == 1) {
function doGeoUrlHeader($post_list = '') {
global $posts;
if (empty($post_list)) {
$post_list = $posts;
}
if (count($post_list) == 1) {
// there's only one result see if it has a geo code
$row = $posts[0];
$row = $post_list[0];
$lat = $row->post_lat;
$lon = $row->post_lon;
$title = $row->post_title;