Make WordPress Core


Ignore:
Timestamp:
09/15/2004 03:09:39 PM (20 years ago)
Author:
saxmatt
Message:

Axing of geo stuff, major cleanups on permalink options, style tweaks.

File:
1 edited

Legend:

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

    r1637 r1664  
    401401        'Title' => $post->post_title,
    402402        'Category' => $post->post_category,
    403         'Lat' => $post->post_lat,
    404         'Lon' => $post->post_lon,
    405403        'post_status' => $post->post_status,
    406404        'comment_status' => $post->comment_status,
     
    826824}
    827825
    828 function doGeoUrlHeader($post_list = '') {
    829     global $posts;
    830 
    831   if (get_settings('use_geo_positions')) {
    832         if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) {
    833             // there's only one result  see if it has a geo code
    834             $row = $posts[0];
    835             $lat = $row->post_lat;
    836             $lon = $row->post_lon;
    837             $title = $row->post_title;
    838             if(($lon != null) && ($lat != null) ) {
    839                 echo "<meta name=\"ICBM\" content=\"".$lat.", ".$lon."\" />\n";
    840                 echo "<meta name=\"DC.title\" content=\"".convert_chars(strip_tags(htmlspecialchars(get_bloginfo("name"))))." - ".$title."\" />\n";
    841                 echo "<meta name=\"geo.position\" content=\"".$lat.";".$lon."\" />\n";
    842                 return;
    843             }
    844         } else {
    845             if(get_settings('use_default_geourl')) {
    846                 // send the default here
    847                 echo "<meta name='ICBM' content=\"". get_settings('default_geourl_lat') .", ". get_settings('default_geourl_lon') ."\" />\n";
    848                 echo "<meta name='DC.title' content=\"".convert_chars(strip_tags(htmlspecialchars(get_bloginfo("name"))))."\" />\n";
    849                 echo "<meta name='geo.position' content=\"". get_settings('default_geourl_lat') .";". get_settings('default_geourl_lon') ."\" />\n";
    850             }
    851         }
    852     }
    853 }
    854 
    855 function getRemoteFile($host,$path) {
    856     $fp = fsockopen($host, 80, $errno, $errstr, 5);
    857     if ($fp) {
    858         fputs($fp,"GET $path HTTP/1.0\r\nHost: $host\r\n\r\n");
    859         while ($line = fgets($fp, 4096)) {
    860             $lines[] = $line;
    861         }
    862         fclose($fp);
    863         return $lines;
    864     } else {
    865         return false;
    866     }
    867 }
    868 
    869 function pingGeoURL($blog_ID) {
    870 
    871     $ourUrl = get_settings('home') ."/index.php?p=".$blog_ID;
    872     $host="geourl.org";
    873     $path="/ping/?p=".$ourUrl;
    874     getRemoteFile($host,$path);
    875 }
    876 
    877826/* wp_set_comment_status:
    878827   part of otaku42's comment moderation hack
Note: See TracChangeset for help on using the changeset viewer.