mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user