Changeset 956 for trunk/wp-includes/functions.php
- Timestamp:
- 03/01/2004 06:13:32 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r952 r956 86 86 $weekday = date('w',$day); 87 87 $i = 86400; 88 while ($weekday > $start_of_week) {88 while ($weekday > get_settings('start_of_week')) { 89 89 $weekday = date('w',$day); 90 90 $day = $day - 86400; … … 566 566 function pingWeblogs($blog_ID = 1) { 567 567 // 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'))) { 570 569 $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')), 572 571 new xmlrpcval(get_settings('siteurl') . '/' . get_settings('blogfilename') 573 572 ))); … … 584 583 // pings Weblogs.com/rssUpdates 585 584 function 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) { 588 587 $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))); 590 589 $result = $client->send($message); 591 590 if (!$result || $result->faultCode()) { … … 600 599 // pings CaféLog.com 601 600 function 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 != '')) { 604 603 $client = new xmlrpc_client("/xmlrpc.php", "cafelog.tidakada.com", 80); 605 604 $message = new xmlrpcmsg("b2.ping", array(new xmlrpcval($cafelogID), new xmlrpcval($title), new xmlrpcval($p))); … … 616 615 // pings Blo.gs 617 616 function 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'); 621 620 $client = new xmlrpc_client('/', 'ping.blo.gs', 80); 622 621 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'))); 624 623 } 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))); 626 625 } 627 626 $result = $client->send($message); … … 638 637 // Send a Trackback 639 638 function trackback($trackback_url, $title, $excerpt, $ID) { 640 global $ blogname, $wpdb, $tableposts;639 global $wpdb, $tableposts; 641 640 $title = urlencode(stripslashes($title)); 642 641 $excerpt = urlencode(stripslashes($excerpt)); 643 $blog_name = urlencode(stripslashes( $blogname));642 $blog_name = urlencode(stripslashes(get_settings('blogname'))); 644 643 $tb_url = $trackback_url; 645 644 $url = urlencode(get_permalink($ID)); … … 972 971 973 972 function 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; 977 975 $host="geourl.org"; 978 976 $path="/ping/?p=".$ourUrl; … … 1045 1043 global $wpdb, $tablecomments, $tableposts, $tableusers; 1046 1044 global $querystring_start, $querystring_equal, $querystring_separator; 1047 global $blogname, $blog_charset;1048 1045 1049 1046 $comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1"); … … 1055 1052 $comment_author_domain = gethostbyaddr($comment->comment_author_IP); 1056 1053 1057 $blogname = stripslashes( $blogname);1054 $blogname = stripslashes(get_settings('blogname')); 1058 1055 1059 1056 if ('comment' == $comment_type) { … … 1091 1088 $message_headers = "MIME-Version: 1.0\r\n" 1092 1089 . "$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"; 1094 1091 1095 1092 @mail($user->user_email, $subject, $notify_message, $message_headers); … … 1106 1103 global $wpdb, $tablecomments, $tableposts, $tableusers; 1107 1104 global $querystring_start, $querystring_equal, $querystring_separator; 1108 global $blogname, $blog_charset;1109 1105 1110 1106 $comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1"); … … 1126 1122 $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n"; 1127 1123 1128 $subject = '[' . stripslashes( $blogname) . '] Please approve: "' .stripslashes($post->post_title).'"';1124 $subject = '[' . stripslashes(get_settings('blogname')) . '] Please approve: "' .stripslashes($post->post_title).'"'; 1129 1125 $admin_email = get_settings("admin_email"); 1130 1126 $from = "From: $admin_email"; … … 1132 1128 $message_headers = "MIME-Version: 1.0\r\n" 1133 1129 . "$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"; 1135 1131 1136 1132 @mail($admin_email, $subject, $notify_message, $message_headers);
Note: See TracChangeset
for help on using the changeset viewer.