Make WordPress Core


Ignore:
Timestamp:
04/28/2004 07:27:03 AM (22 years ago)
Author:
saxmatt
Message:

Allow WordPress installation URI and blog URI to be different.

File:
1 edited

Legend:

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

    r1190 r1203  
    225225        global $wpdb, $tableposts;
    226226
    227         $siteurl = get_settings('siteurl');
     227        $siteurl = get_settings('home');
    228228        // Take a link like 'http://example.com/blog/something'
    229229        // and extract just the '/something':
    … …  
    311311        }
    312312
     313        if ('home' == $setting && '' == $settings->home) return $settings->siteurl;
     314
    313315        if (!isset($settings->$setting)) {
    314316                return false;
    … …  
    326328                        //  never underestimate the ingenuity of the fools :)"
    327329                        if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
     330                        if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value);
     331
    328332                        $all_options->{$option->option_name} = $option->option_value;
    329333                }
    … …  
    532536  $f = new xmlrpcmsg('weblogUpdates.ping',
    533537                                array(new xmlrpcval(get_settings('blogname'), 'string'),
    534                                         new xmlrpcval(get_settings('siteurl') ,'string')));
     538                                        new xmlrpcval(get_settings('home') ,'string')));
    535539  $c = new xmlrpc_client($path, $server, 80);
    536540  $r = $c->send($f);
    … …  
    637641                $link_text = $matches[4][$i];
    638642                $content = str_replace($link_match, $link_text.' '.$link_number, $content);
    639                 $link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('siteurl') . $link_url : $link_url;
     643                $link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('home') . $link_url : $link_url;
    640644                $links_summary .= "\n".$link_number.' '.$link_url;
    641645        }
    … …  
    918922function pingGeoURL($blog_ID) {
    919923
    920     $ourUrl = get_settings('siteurl') ."/index.php?p=".$blog_ID;
     924    $ourUrl = get_settings('home') ."/index.php?p=".$blog_ID;
    921925    $host="geourl.org";
    922926    $path="/ping/?p=".$ourUrl;
Note: See TracChangeset for help on using the changeset viewer.