Changeset 956

Show
Ignore:
Timestamp:
03/01/04 06:13:32 (5 years ago)
Author:
saxmatt
Message:

Migration to get_settings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/index.php

    r950 r956  
    1212    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> 
    1313     
    14     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" /> 
     14    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    1515    <meta name="generator" content="WordPress <?php echo $wp_version; ?>" /> <!-- leave this for stats --> 
    1616 
  • trunk/wp-admin/admin-header.php

    r879 r956  
    5858<link rel="stylesheet" href="wp-admin.css" type="text/css" /> 
    5959<link rel="shortcut icon" href="../wp-images/wp-favicon.png" /> 
    60 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset ?>" /> 
     60<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    6161<?php 
    6262if ($redirect==1) { 
  • trunk/wp-admin/bookmarklet.php

    r879 r956  
    7272<head> 
    7373<title>WordPress > Bookmarklet</title> 
    74 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset ?>" /> 
     74<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    7575<link rel="stylesheet" href="wp-admin.css" type="text/css" /> 
    7676<link rel="shortcut icon" href="../wp-images/wp-favicon.png" /> 
  • trunk/wp-admin/edit-form-advanced.php

    r955 r956  
    33<?php 
    44 
    5 $allowed_users = explode(" ", trim($fileupload_allowedusers)); 
     5$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers'))); 
    66 
    77$submitbutton_text = 'Save'; 
     
    1212$form_pingback = '<input type="hidden" name="post_pingback" value="0" />'; 
    1313$form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />'; 
    14 if ($use_trackback) { 
     14if (get_settings('use_trackback')) { 
    1515    $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a></label> 
    1616     (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> 
  • trunk/wp-admin/edit-form-comment.php

    r955 r956  
    11<?php 
    22 
    3 $allowed_users = explode(" ", trim($fileupload_allowedusers)); 
     3$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers'))); 
    44 
    55$submitbutton_text = 'Edit this!'; 
  • trunk/wp-admin/edit-form.php

    r955 r956  
    33<?php 
    44 
    5 $allowed_users = explode(" ", trim($fileupload_allowedusers)); 
     5$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers'))); 
    66 
    77$submitbutton_text = 'Blog this!'; 
     
    99$form_action = 'post'; 
    1010$form_extra = ''; 
    11 if ($use_pingback) { 
     11if (get_settings('use_pingback')) { 
    1212    $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" '; 
    1313    if ($post_pingback) $form_pingback .= 'checked="checked" '; 
     
    1616    $form_pingback = ''; 
    1717} 
    18 if ($use_trackback) { 
     18if (get_settings('use_trackback')) { 
    1919    $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> 
    2020    <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>'; 
  • trunk/wp-admin/install.php

    r947 r956  
    420420"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)", 
    421421"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)", 
    422 "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(28,'blodotgsping_url', 3, 'http://example.com', 'You shouldn\'t need to change this.', 8, 30)", 
    423422"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(29,'use_trackback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be trackback\'able or not note: setting it to zero would also disable sending trackbacks', 8, 20)", 
    424423"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(30,'use_pingback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be pingback\'able or not note: setting it to zero would also disable sending pingbacks', 8, 20)", 
     
    701700    $query= "UPDATE $tableoptions set option_value='$url' where option_id=1"; //siteurl 
    702701    $q = $wpdb->query($query); 
    703     $query= "UPDATE $tableoptions set option_value='$url' where option_id=28"; //blodotgsping_url 
    704     $q = $wpdb->query($query); 
    705702    $query= "UPDATE $tableoptions set option_value='$url/wp-images/smilies' where option_id=17"; //smilies_directory 
    706703    $q = $wpdb->query($query); 
  • trunk/wp-admin/link-import.php

    r654 r956  
    100100                else // try to get the upload file. 
    101101                { 
    102                     $uploaddir = $fileupload_realpath
     102                    $uploaddir = get_settings('fileupload_realpath')
    103103                    $uploadfile = $uploaddir.'/'.$_FILES['userfile']['name']; 
    104104 
  • trunk/wp-admin/menu.php

    r945 r956  
    1414        if ((substr($self, -20) == substr($item[1], -20) && empty($parent_file)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"'; 
    1515        if ($user_level >= $item[0]) { 
    16             if (('upload.php' == $item[1] && $use_fileupload && ($user_level >= $fileupload_minlevel
    17          && (in_array($user_login, explode(' ', $allowed_users)) || (trim($fileupload_allowedusers)==""))) || 'upload.php' != $item[1]) 
     16            if (('upload.php' == $item[1] && get_settings('use_fileupload') && ($user_level >= get_settings('fileupload_minlevel')
     17         && (in_array($user_login, explode(' ', $allowed_users)) || (trim(get_settings('fileupload_allowedusers'))==''))) || 'upload.php' != $item[1]) 
    1818                echo "\n\t<li><a href='{$item[1]}'$class>{$item[2]}</a></li>"; 
    1919        } 
  • trunk/wp-admin/post.php

    r949 r956  
    708708 
    709709<?php 
    710 $bookmarklet_height= ($use_trackback) ? 460 : 420; 
     710$bookmarklet_height= (get_settings('use_trackback')) ? 460 : 420; 
    711711 
    712712if ($is_NS4 || $is_gecko) { 
    713713?> 
    714714    <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));">Press It  
    715     - <?php echo $blogname ?></a>  
     715    - <?php echo get_settings('blogname'); ?></a>  
    716716    <?php 
    717717} else if ($is_winIE) { 
    718718?> 
    719719    <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it  
    720     - <?php echo $blogname ?></a>  
     720    - <?php echo get_settings('blogname'); ?></a>  
    721721    <script type="text/javascript" language="JavaScript"> 
    722722<!-- 
     
    734734?> 
    735735    <a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">Press it  
    736     - <?php echo $blogname ?></a>  
     736    - <?php echo get_settings('blogname'); ?></a>  
    737737    <?php 
    738738} else if ($is_macIE) { 
    739739?> 
    740740    <a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it  
    741     - <?php echo $blogname ?></a>  
     741    - <?php echo get_settings('blogname'); ?></a>  
    742742    <?php 
    743743} 
  • trunk/wp-admin/profile.php

    r945 r956  
    179179 
    180180 
    181     $bookmarklet_tbpb  = ($use_trackback) ? '&trackback=1' : ''; 
    182     $bookmarklet_tbpb .= ($use_pingback)  ? '&pingback=1'  : ''; 
    183     $bookmarklet_height= ($use_trackback) ? 590 : 550; 
     181    $bookmarklet_tbpb  = (get_settings('use_trackback')) ? '&trackback=1' : ''; 
     182    $bookmarklet_tbpb .= (get_settings('use_pingback'))  ? '&pingback=1'  : ''; 
     183    $bookmarklet_height= (get_settings('use_trackback')) ? 590 : 550; 
    184184 
    185185    ?> 
     
    192192    <p>To have a one-click bookmarklet, just copy and paste this<br />into a new text file:</p> 
    193193    <?php 
    194     $regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ".$blogname."]\r\n@=\"javascript:doc=external.menuArguments.document;Q=doc.selection.createRange().text;void(btw=window.open('". get_settings('siteurl') ."/wp-admin/bookmarklet.php?text='+escape(Q)+'".$bookmarklet_tbpb."&popupurl='+escape(doc.location.href)+'&popuptitle='+escape(doc.title),'bookmarklet','scrollbars=no,width=480,height=".$bookmarklet_height.",left=100,top=150,status=yes'));btw.focus();\"\r\n\"contexts\"=hex:31\""; 
     194    $regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ". get_settings('blogname') ."]\r\n@=\"javascript:doc=external.menuArguments.document;Q=doc.selection.createRange().text;void(btw=window.open('". get_settings('siteurl') ."/wp-admin/bookmarklet.php?text='+escape(Q)+'".$bookmarklet_tbpb."&popupurl='+escape(doc.location.href)+'&popuptitle='+escape(doc.title),'bookmarklet','scrollbars=no,width=480,height=".$bookmarklet_height.",left=100,top=150,status=yes'));btw.focus();\"\r\n\"contexts\"=hex:31\""; 
    195195    ?> 
    196196    <pre style="margin: 20px; background-color: #cccccc; border: 1px dashed #333333; padding: 5px; font-size: 12px;"><?php echo $regedit; ?></pre> 
     
    217217    $profiledata=get_userdata($user_ID); 
    218218 
    219     $bookmarklet_tbpb  = ($use_trackback) ? '&trackback=1' : ''; 
    220     $bookmarklet_tbpb .= ($use_pingback)  ? '&pingback=1'  : ''; 
    221     $bookmarklet_height= ($use_trackback) ? 480 : 440; 
     219    $bookmarklet_tbpb  = (get_settings('use_trackback')) ? '&trackback=1' : ''; 
     220    $bookmarklet_tbpb .= (get_settings('use_pingback'))  ? '&pingback=1'  : ''; 
     221    $bookmarklet_height= (get_settings('use_trackback')) ? 480 : 440; 
    222222 
    223223    ?> 
     
    324324        { 
    325325          if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) 
    326             window.sidebar.addPanel("WordPress Post: <?php echo $blogname ?>","<?php echo get_settings('siteurl'); ?>/wp-admin/sidebar.php",""); 
     326            window.sidebar.addPanel("WordPress Post: <?php echo get_settings('blogname'); ?>","<?php echo get_settings('siteurl'); ?>/wp-admin/sidebar.php",""); 
    327327          else 
    328328            alert('No Sidebar found!  You must use Mozilla 0.9.4 or later!'); 
  • trunk/wp-admin/upgrade-functions.php

    r955 r956  
    197197        "26" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)", 
    198198        "27" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)", 
    199         "28" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (28,'blodotgsping_url', 3, 'http://example.com', 'You shouldn\'t need to change this.', 8, 30)", 
    200199        "29" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (29,'use_trackback', 2, '1', 'set this to false or true, whether you want to allow your posts to be trackback\'able or not note: setting it to false would also disable sending trackbacks', 8, 20)", 
    201200        "30" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (30,'use_pingback', 2, '1', 'set this to false or true, whether you want to allow your posts to be pingback\'able or not note: setting it to false would also disable sending pingbacks', 8, 20)", 
  • trunk/wp-admin/upload.php

    r891 r956  
    77    die ("Cheatin' uh ?"); 
    88 
    9 if (!$use_fileupload) //Checks if file upload is enabled in the config 
     9if (!get_settings('use_fileupload')) //Checks if file upload is enabled in the config 
    1010    die ("The admin disabled this function"); 
    1111 
    12 $allowed_types = explode(' ', trim($fileupload_allowedtypes)); 
     12$allowed_types = explode(' ', trim(get_settings('fileupload_allowedtypes'))); 
    1313 
    1414if ($HTTP_POST_VARS['submit']) { 
     
    1818} 
    1919 
    20 if (!is_writable($fileupload_realpath)) 
     20if (!is_writable(get_settings('fileupload_realpath'))) 
    2121    $action = 'not-writable'; 
    2222?> 
     
    2828case 'not-writable': 
    2929?> 
    30 <p>It doesn't look like you can use the file upload feature at this time because the directory you have specified (<code><?php echo $fileupload_realpath; ?></code>) doesn't appear to be writable by WordPress. Check the permissions on the directory and for typos.</p> 
     30<p>It doesn't look like you can use the file upload feature at this time because the directory you have specified (<code><?php echo $get_settings('fileupload_realpath'); ?></code>) doesn't appear to be writable by WordPress. Check the permissions on the directory and for typos.</p> 
    3131 
    3232<?php 
     
    4343      <label for="img1">File:</label> 
    4444      <br /> 
    45     <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $fileupload_maxk * 1024 ?>" /> 
     45    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_settings('fileupload_maxk') * 1024 ?>" /> 
    4646    <input type="file" name="img1" id="img1" size="35" class="uploadform" /></p> 
    4747    <p> 
     
    9797 
    9898    if (strlen($imgalt)) { 
    99         $pathtofile = $fileupload_realpath."/".$imgalt; 
     99        $pathtofile = get_settings('fileupload_realpath')."/".$imgalt; 
    100100        $img1 = $HTTP_POST_VARS['img1']; 
    101101    } else { 
    102         $pathtofile = $fileupload_realpath."/".$img1_name; 
     102        $pathtofile = get_settings('fileupload_realpath')."/".$img1_name; 
    103103        $img1 = $HTTP_POST_FILES['img1']['tmp_name']; 
    104104    } 
     
    119119 
    120120    if (file_exists($pathtofile) && !strlen($imgalt)) { 
    121         $i = explode(" ",$fileupload_allowedtypes); 
    122         $i = implode(", ",array_slice($i, 1, count($i)-2)); 
     121        $i = explode(' ', get_settings('fileupload_allowedtypes')); 
     122        $i = implode(', ',array_slice($i, 1, count($i)-2)); 
    123123        $moved = move_uploaded_file($img1, $pathtofile2); 
    124124        // if move_uploaded_file() fails, try copy() 
     
    139139    <p>Confirm or rename:</p> 
    140140    <form action="upload.php" method="post" enctype="multipart/form-data"> 
    141     <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $fileupload_maxk*1024 ?>" /> 
     141    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_settings('fileupload_maxk') *1024 ?>" /> 
    142142    <input type="hidden" name="img1_type" value="<?php echo $img1_type;?>" /> 
    143143    <input type="hidden" name="img1_name" value="<?php echo $img2_name;?>" /> 
     
    198198 
    199199if ( ereg('image/',$img1_type)) { 
    200     $piece_of_code = "&lt;img src=&quot;$fileupload_url/$img1_name&quot; alt=&quot;$imgdesc&quot; /&gt;"; 
     200    $piece_of_code = "&lt;img src=&quot;". get_settings('fileupload_url') ."/$img1_name&quot; alt=&quot;$imgdesc&quot; /&gt;"; 
    201201} else { 
    202     $piece_of_code = "&lt;a href=&quot;$fileupload_url/$img1_name&quot; title=&quot;$imgdesc&quot; /&gt;$imgdesc&lt;/a&gt;"; 
     202    $piece_of_code = "&lt;a href=&quot;". get_settings('fileupload_url') . "/$img1_name&quot; title=&quot;$imgdesc&quot; /&gt;$imgdesc&lt;/a&gt;"; 
    203203}; 
    204204 
  • trunk/wp-admin/users.php

    r955 r956  
    8787    } 
    8888 
    89     $message  = "New user registration on your blog $blogname:\r\n\r\n"; 
     89    $message  = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n"; 
    9090    $message .= "Login: $user_login\r\n\r\nE-mail: $user_email"; 
    9191 
    92     @mail($admin_email, "[$blogname] New User Registration", $message); 
     92    @mail($admin_email, '[' . get_settings('blogname') . '] New User Registration', $message); 
    9393    header('Location: users.php'); 
    9494break; 
  • trunk/wp-atom.php

    r901 r956  
    88header('Content-type: application/atom+xml', true); 
    99 
    10 if (!isset($rss_language)) { $rss_language = 'en'; } 
    11 if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; } 
    12 if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; } 
    1310?> 
    1411<?php echo '<?xml version="1.0"?'.'>'; ?> 
     
    1613  xmlns="http://purl.org/atom/ns#" 
    1714  xmlns:dc="http://purl.org/dc/elements/1.1/" 
    18   xml:lang="<?php echo $rss_language ?>"> 
     15  xml:lang="<?php echo get_settings('rss_language'); ?>"> 
    1916    <title><?php bloginfo_rss('name') ?></title> 
    2017    <link rel="alternate" type="text/html" href="<?php bloginfo_rss('url') ?>" /> 
     
    3532        <issued><?php the_time('Y-m-d\TH:i:s\Z'); ?></issued> 
    3633        <?php the_category_rss('rdf') ?> 
    37 <?php $more = 1; if ($rss_use_excerpt) { 
     34<?php $more = 1; if (get_settings('rss_use_excerpt')) { 
    3835?> 
    39         <summary type="text/html" mode="escaped"><?php the_excerpt_rss($rss_excerpt_length, 2) ?></summary> 
     36        <summary type="text/html" mode="escaped"><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></summary> 
    4037<?php 
    4138} else { // use content 
    4239?> 
    43         <summary type="text/html"><?php the_content_rss('', 0, '', $rss_excerpt_length, 2) ?></summary> 
     40        <summary type="text/html"><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></summary> 
    4441<?php 
    4542} // end else use content 
     
    4744        <content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content> 
    4845    </entry> 
    49     <?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?> 
     46    <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?> 
    5047</feed> 
  • trunk/wp-comments-popup.php

    r945 r956  
    99<html xmlns="http://www.w3.org/1999/xhtml"> 
    1010<head> 
    11     <title><?php echo $blogname ?> - Comments on "<?php the_title() ?>"</title> 
     11    <title><?php echo get_settings('blogname'); ?> - Comments on "<?php the_title() ?>"</title> 
    1212 
    13     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" /> 
     13    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    1414    <style type="text/css" media="screen"> 
    1515        @import url( wp-layout.css ); 
     
    2020<body id="commentspopup"> 
    2121 
    22 <h1 id="header"><a href="" title="<?php echo $blogname ?>"><?php echo $blogname ?></a></h1> 
     22<h1 id="header"><a href="" title="<?php echo get_settings('blogname'); ?>"><?php echo get_settings('blogname'); ?></a></h1> 
    2323 
    2424<h2 id="comments">Comments</h2> 
  • trunk/wp-comments-post.php

    r914 r956  
    4040    die('Sorry, comments are closed for this item.'); 
    4141 
    42 if ($require_name_email && ($email == '' || $author == '')) { //original fix by Dodo, and then Drinyth 
     42if (get_settings('require_name_email') && ($email == '' || $author == '')) { //original fix by Dodo, and then Drinyth 
    4343    die('Error: please fill the required fields (name, email).'); 
    4444} 
     
    102102    } 
    103103     
    104     if (($comments_notify) && ($approved)) { 
     104    if ((get_settings('comments_notify')) && ($approved)) { 
    105105        wp_notify_postauthor($comment_ID, 'comment'); 
    106106    } 
  • trunk/wp-commentsrss2.php

    r900 r956  
    66header('Content-type: text/xml'); 
    77 
    8 if (!isset($rss_language)) { $rss_language = 'en'; } 
    98echo '<?xml version="1.0"?'.'>';  
    109?> 
     
    2221    <link><?php (isset($_REQUEST["p"]) || isset($_REQUEST["name"])) ? permalink_single_rss() : bloginfo_rss("url") ?></link> 
    2322    <description><?php bloginfo_rss("description") ?></description> 
    24     <language><?php echo $rss_language ?></language> 
     23    <language><?php echo get_settings('rss_language'); ?></language> 
    2524    <pubDate><?php echo gmdate('r'); ?></pubDate> 
    2625    <generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator> 
     
    3433            AND $tablecomments.comment_approved = '1' AND $tableposts.post_status = 'publish'  
    3534            AND post_date < '".date("Y-m-d H:i:s")."'  
    36             ORDER BY comment_date LIMIT $posts_per_rss"); 
     35            ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') ); 
    3736        } else { // if no post id passed in, we'll just ue the last 10 comments. 
    3837            $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,  
     
    4140            LEFT JOIN $tableposts ON comment_post_id = id WHERE $tableposts.post_status = 'publish'  
    4241            AND $tablecomments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'   
    43             ORDER BY comment_date DESC LIMIT $posts_per_rss"); 
     42            ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') ); 
    4443        } 
    4544    // this line is WordPress' motor, do not delete it. 
  • trunk/wp-includes/functions-formatting.php

    r955 r956  
    8282 
    8383function convert_chars($content, $flag='obsolete attribute left there for backwards compatibility') { // html/unicode entities output 
    84     global $use_htmltrans, $wp_htmltrans, $wp_htmltranswinuni; 
     84    global $wp_htmltrans, $wp_htmltranswinuni; 
    8585 
    8686    // removes metadata tags 
     
    8888    $content = preg_replace('/<category>(.+?)<\/category>/','',$content); 
    8989     
    90     if ($use_htmltrans) { 
     90    if (get_settings('use_htmltrans')) { 
    9191        // converts lone & characters into &#38; (a.k.a. &amp;) 
    9292        $content = preg_replace('/&[^#](?![a-z]*;)/ie', '"&#38;".substr("\0",1)', $content); 
     
    125125*/ 
    126126function balanceTags($text, $is_comment = 0) { 
    127     global $use_balanceTags; 
    128127     
    129     if ($use_balanceTags == 0) { 
     128    if (get_settings('use_balanceTags') == 0) { 
    130129        return $text; 
    131130    } 
  • 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�g.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); 
  • trunk/wp-includes/template-functions-general.php

    r955 r956  
    2323 
    2424function get_bloginfo($show='') { 
    25     global $blogname, $admin_email; 
     25    global $admin_email; 
    2626 
    2727    $do_perma = 0; 
     
    8080        case 'name': 
    8181        default: 
    82             $output = $blogname
     82            $output = get_settings('blogname')
    8383            break; 
    8484    } 
     
    206206function get_archives($type='', $limit='', $format='html', $before = "", $after = "", $show_post_count = false) { 
    207207    global $tableposts, $time_difference; 
    208     global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb, $start_of_week
     208    global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb
    209209 
    210210    if ('' == $type) { 
     
    271271        } 
    272272    } elseif ('weekly' == $type) { 
    273         if (!isset($start_of_week)) { 
    274             $start_of_week = 1; 
    275         } 
     273    $start_of_week = get_settings('start_of_week'); 
    276274        $arcresults = $wpdb->get_results("SELECT DISTINCT WEEK($wp_posts_post_date_field, $start_of_week) AS `week`, YEAR($wp_posts_post_date_field) AS yr, DATE_FORMAT($wp_posts_post_date_field, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit); 
    277275        $arc_w_last = ''; 
     
    281279                    $arc_year = $arcresult->yr; 
    282280                    $arc_w_last = $arcresult->week; 
    283                     $arc_week = get_weekstartend($arcresult->yyyymmdd, $start_of_week); 
     281                    $arc_week = get_weekstartend($arcresult->yyyymmdd, get_settings('start_of_week')); 
    284282                    $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']); 
    285283                    $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']); 
  • trunk/wp-locations.php

    r628 r956  
    1616        <longitude><?php print_Lon() ?></longitude> 
    1717<?php 
    18         if ($rss_use_excerpt) { 
     18        if (get_settings('rss_use_excerpt')) { 
    1919?> 
    20         <note><?php the_content_rss('', 0, '', $rss_excerpt_length, $rss_encoded_html) ?> 
     20        <note><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?> 
    2121        </note> 
    2222<?php 
    2323        } else { // use content 
    2424?> 
    25         <note><?php the_excerpt_rss('', 0, '', $rss_excerpt_length, $rss_encoded_html) ?></note> 
     25        <note><?php the_excerpt_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></note> 
    2626<?php 
    2727        } // end else use content 
  • trunk/wp-login.php

    r955 r956  
    163163<head> 
    164164    <title>WordPress &rsaquo; Lost password ?</title> 
    165     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" /> 
     165    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    166166    <link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" /> 
    167167    <script type="text/javascript"> 
     
    214214    $message .= 'Login at: ' . get_settings('siteurl') . '/wp-login.php'; 
    215215 
    216     $m = mail($user_email, "[$blogname] Your weblog's login/password", $message); 
     216    $m = mail($user_email, '[' . get_settings('blogname') . "] Your weblog's login/password", $message); 
    217217 
    218218    if ($m == false) { 
     
    224224        <a href='wp-login.php' title='Check your email first, of course'>Click here to login!</a></p>"; 
    225225        // send a copy of password change notification to the admin 
    226         mail($admin_email, "[$blogname] Password Lost/Change", "Password Lost and Changed for user: $user_login"); 
     226        mail($admin_email, '[' . get_settings('blogname') . "] Password Lost/Change", "Password Lost and Changed for user: $user_login"); 
    227227        die(); 
    228228    } 
     
    267267<head> 
    268268    <title>WordPress > <?php bloginfo('name') ?> > Login form</title> 
    269     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" /> 
     269    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    270270    <link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" /> 
    271271    <script type="text/javascript"> 
  • trunk/wp-rdf.php

    r901 r956  
    2323 
    2424add_filter('the_content', 'trim'); 
    25 if (!isset($rss_language)) { $rss_language = 'en'; } 
    2625?> 
    2726<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?> 
     
    3938    <link><?php bloginfo_rss('url') ?></link> 
    4039    <description><?php bloginfo_rss('description') ?></description> 
    41     <dc:language><?php echo $rss_language ?></dc:language> 
     40    <dc:language><?php echo get_settings('rss_language'); ?></dc:language> 
    4241    <dc:date><?php echo gmdate('Y-m-d\TH:i:s'); ?></dc:date> 
    4342    <dc:creator><?php echo antispambot($admin_email) ?></dc:creator> 
     
    5150        <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 
    5251            <rdf:li rdf:resource="<?php permalink_single_rss() ?>"/> 
    53         <?php $wp_items[] = $row; $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?> 
     52        <?php $wp_items[] = $row; $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?> 
    5453        </rdf:Seq> 
    5554    </items> 
     
    6261    <dc:creator><?php the_author() ?> (mailto:<?php the_author_email() ?>)</dc:creator> 
    6362    <?php the_category_rss('rdf') ?> 
    64 <?php $more = 1; if ($rss_use_excerpt) { 
     63<?php $more = 1; if (get_settings('rss_use_excerpt')) { 
    6564?> 
    66     <description><?php the_excerpt_rss($rss_excerpt_length, 2) ?></description> 
     65    <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description> 
    6766<?php 
    6867} else { // use content 
    6968?> 
    70     <description><?php the_content_rss('', 0, '', $rss_excerpt_length, 2) ?></description> 
     69    <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description> 
    7170<?php 
    7271} // end else use content 
  • trunk/wp-register.php

    r955 r956  
    105105    } 
    106106 
    107     $message  = "New user registration on your blog $blogname:\r\n\r\n"; 
     107    $message  = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n"; 
    108108    $message .= "Login: $user_login\r\n\r\nE-mail: $user_email"; 
    109109 
    110     @mail($admin_email, "[$blogname] New User Registration", $message); 
     110    @mail($admin_email, '[' . get_settings('blogname') . '] New User Registration', $message); 
    111111 
    112112    ?> 
     
    115115<head> 
    116116    <title>WordPress &raquo; Registration Complete</title> 
    117     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" />   
     117    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />    
    118118    <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" /> 
    119119</head> 
     
    143143<head> 
    144144    <title>WordPress &raquo; Registration Currently Disabled</title> 
    145     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>"> 
     145    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>"> 
    146146    <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css"> 
    147147</head> 
     
    169169<head> 
    170170    <title>WordPress &raquo; Registration Form</title> 
    171     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" /> 
     171    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" /> 
    172172    <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" /> 
    173173</head> 
  • trunk/wp-rss.php

    r836 r956  
    2323*/ 
    2424 
    25 if (!isset($rss_language)) { $rss_language = 'en'; } 
    26 if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; } 
    27 if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; } 
    2825?> 
    2926<?php echo "<?xml version=\"1.0\"?".">"; ?> 
     
    3835        <managingEditor><?php echo antispambot($admin_email) ?></managingEditor> 
    3936        <webMaster><?php echo antispambot($admin_email) ?></webMaster> 
    40         <language><?php echo $rss_language ?></language> 
     37        <language><?php echo get_settings('rss_language'); ?></language> 
    4138 
    4239<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 
     
    4845//          echo "<category>"; the_category_unicode(); echo "</category>"; 
    4946$more = 1;  
    50 if ($rss_use_excerpt) { 
     47if (get_settings('rss_use_excerpt')) { 
    5148?> 
    52             <description><?php the_excerpt_rss($rss_excerpt_length, $rss_encoded_html) ?></description> 
     49            <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></description>