Make WordPress Core


Ignore:
Timestamp:
04/26/2004 02:34:07 AM (21 years ago)
Author:
rboren
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r1150 r1179  
    868868}
    869869
    870 function doGeoUrlHeader($posts) {
    871     if (count($posts) == 1) {
     870function doGeoUrlHeader($post_list = '') {
     871    global $posts;
     872
     873    if (empty($post_list)) {
     874        $post_list = $posts;
     875    }
     876
     877    if (count($post_list) == 1) {
    872878        // there's only one result  see if it has a geo code
    873         $row = $posts[0];
     879        $row = $post_list[0];
    874880        $lat = $row->post_lat;
    875881        $lon = $row->post_lon;
Note: See TracChangeset for help on using the changeset viewer.