Make WordPress Core


Ignore:
Timestamp:
03/01/2004 06:13:32 AM (21 years ago)
Author:
saxmatt
Message:

Migration to get_settings

File:
1 edited

Legend:

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

    r952 r956  
    8686    $weekday = date('w',$day);
    8787    $i = 86400;
    88     while ($weekday > $start_of_week) {
     88    while ($weekday > get_settings('start_of_week')) {
    8989        $weekday = date('w',$day);
    9090        $day = $day - 86400;
     
    566566function pingWeblogs($blog_ID = 1) {
    567567    // original function by Dries Buytaert for Drupal
    568     global $use_weblogsping, $blogname;
    569     if ((!(($blogname=="my weblog") && (get_settings('siteurl')=="http://example.com") && (get_settings('blogfilename') == "wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_weblogsping)) {
     568    if ((!((get_settings('blogname')=="my weblog") && (get_settings('siteurl')=="http://example.com") && (get_settings('blogfilename') == "wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && (get_settings('use_weblogsping'))) {
    570569        $client = new xmlrpc_client("/RPC2", "rpc.weblogs.com", 80);
    571         $message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval($blogname),
     570        $message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval(get_settings('blogname')),
    572571        new xmlrpcval(get_settings('siteurl') . '/' . get_settings('blogfilename')
    573572        )));
     
    584583// pings Weblogs.com/rssUpdates
    585584function pingWeblogsRss($blog_ID = 1, $rss_url) {
    586     global $use_weblogsrssping, $blogname, $rss_url;
    587     if ($blogname != 'my weblog' && $rss_url != 'http://example.com/b2rdf.php' && $use_weblogsrssping) {
     585    global $use_weblogsrssping, $rss_url;
     586    if (get_settings('blogname') != 'my weblog' && $rss_url != 'http://example.com/b2rdf.php' && $use_weblogsrssping) {
    588587        $client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80);
    589         $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval($blogname), new xmlrpcval($rss_url)));
     588        $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($rss_url)));
    590589        $result = $client->send($message);
    591590        if (!$result || $result->faultCode()) {
     
    600599// pings CaféLog.com
    601600function pingCafelog($cafelogID,$title='',$p='') {
    602     global $use_cafelogping, $blogname;
    603     if ((!(($blogname=="my weblog") && (get_settings('siteurl') == "http://example.com") && (get_settings('blogfilename')=="wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_cafelogping) && ($cafelogID != '')) {
     601    global $use_cafelogping;
     602    if ((!((get_settings('blogname')=="my weblog") && (get_settings('siteurl') == "http://example.com") && (get_settings('blogfilename')=="wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_cafelogping) && ($cafelogID != '')) {
    604603        $client = new xmlrpc_client("/xmlrpc.php", "cafelog.tidakada.com", 80);
    605604        $message = new xmlrpcmsg("b2.ping", array(new xmlrpcval($cafelogID), new xmlrpcval($title), new xmlrpcval($p)));
     
    616615// pings Blo.gs
    617616function pingBlogs($blog_ID="1") {
    618     global $use_blodotgsping, $blodotgsping_url, $use_rss, $blogname;
    619     if ((!(($blogname=='my weblog') && (get_settings('siteurl')=='http://example.com') && (get_settings('blogfilename')=='wp.php'))) && (!preg_match('/localhost\//',get_settings('siteurl'))) && ($use_blodotgsping)) {
    620         $url = ($blodotgsping_url == 'http://example.com') ? get_settings('siteurl').'/'.get_settings('blogfilename') : $blodotgsping_url;
     617    global $use_rss;
     618    if ((!((get_settings('blogname')=='my weblog') && (get_settings('siteurl')=='http://example.com') && (get_settings('blogfilename')=='wp.php'))) && (!preg_match('/localhost\//',get_settings('siteurl'))) && (get_settings('use_blodotgsping'))) {
     619        $url = get_settings('siteurl').'/'.get_settings('blogfilename');
    621620        $client = new xmlrpc_client('/', 'ping.blo.gs', 80);
    622621        if ($use_rss) {
    623             $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($blogname), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval(get_settings('siteurl').'/b2rss.xml')));
     622            $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval(get_settings('siteurl').'/b2rss.xml')));
    624623        } else {
    625             $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($blogname), new xmlrpcval($url)));
     624            $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($url)));
    626625        }
    627626        $result = $client->send($message);
     
    638637// Send a Trackback
    639638function trackback($trackback_url, $title, $excerpt, $ID) {
    640     global $blogname, $wpdb, $tableposts;
     639    global $wpdb, $tableposts;
    641640    $title = urlencode(stripslashes($title));
    642641    $excerpt = urlencode(stripslashes($excerpt));
    643     $blog_name = urlencode(stripslashes($blogname));
     642    $blog_name = urlencode(stripslashes(get_settings('blogname')));
    644643    $tb_url = $trackback_url;
    645644    $url = urlencode(get_permalink($ID));
     
    972971
    973972function pingGeoURL($blog_ID) {
    974     global $blodotgsping_url;
    975 
    976     $ourUrl = $blodotgsping_url."/index.php?p=".$blog_ID;
     973
     974    $ourUrl = get_settings('siteurl') ."/index.php?p=".$blog_ID;
    977975    $host="geourl.org";
    978976    $path="/ping/?p=".$ourUrl;
     
    10451043    global $wpdb, $tablecomments, $tableposts, $tableusers;
    10461044    global $querystring_start, $querystring_equal, $querystring_separator;
    1047     global $blogname, $blog_charset;
    10481045   
    10491046    $comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1");
     
    10551052    $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
    10561053
    1057     $blogname = stripslashes($blogname);
     1054    $blogname = stripslashes(get_settings('blogname'));
    10581055   
    10591056    if ('comment' == $comment_type) {
     
    10911088    $message_headers = "MIME-Version: 1.0\r\n"
    10921089        . "$from\r\n"
    1093         . "Content-Type: text/plain; charset=\"$blog_charset\"\r\n";
     1090        . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
    10941091
    10951092    @mail($user->user_email, $subject, $notify_message, $message_headers);
     
    11061103    global $wpdb, $tablecomments, $tableposts, $tableusers;
    11071104    global $querystring_start, $querystring_equal, $querystring_separator;
    1108     global $blogname, $blog_charset;
    11091105   
    11101106    $comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1");
     
    11261122    $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
    11271123
    1128     $subject = '[' . stripslashes($blogname) . '] Please approve: "' .stripslashes($post->post_title).'"';
     1124    $subject = '[' . stripslashes(get_settings('blogname')) . '] Please approve: "' .stripslashes($post->post_title).'"';
    11291125    $admin_email = get_settings("admin_email");
    11301126    $from  = "From: $admin_email";
     
    11321128    $message_headers = "MIME-Version: 1.0\r\n"
    11331129        . "$from\r\n"
    1134         . "Content-Type: text/plain; charset=\"$blog_charset\"\r\n";
     1130        . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
    11351131
    11361132    @mail($admin_email, $subject, $notify_message, $message_headers);
Note: See TracChangeset for help on using the changeset viewer.