Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Commit

Permalink
Use get_option instead of get_settings. Just 'cause.
Browse files Browse the repository at this point in the history
git-svn-id: http://core.svn.wordpress.org/trunk@4144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Aug 30, 2006
1 parent 0a170ce commit a3fd544
Show file tree
Hide file tree
Showing 70 changed files with 365 additions and 365 deletions.
14 changes: 7 additions & 7 deletions wp-admin/admin-functions.php
Expand Up @@ -335,10 +335,10 @@ function get_default_post_to_edit() {
$post_excerpt = '';

$post->post_status = 'draft';
$post->comment_status = get_settings('default_comment_status');
$post->ping_status = get_settings('default_ping_status');
$post->post_pingback = get_settings('default_pingback_flag');
$post->post_category = get_settings('default_category');
$post->comment_status = get_option('default_comment_status');
$post->ping_status = get_option('default_ping_status');
$post->post_pingback = get_option('default_pingback_flag');
$post->post_category = get_option('default_category');
$post->post_content = apply_filters('default_content', $post_content);
$post->post_title = apply_filters('default_title', $post_title);
$post->post_excerpt = apply_filters('default_excerpt', $post_excerpt);
Expand Down Expand Up @@ -1106,7 +1106,7 @@ function touch_time($edit = 1, $for_post = 1) {

echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" /> <label for="timestamp">'.__('Edit timestamp').'</label></legend>';

$time_adj = time() + (get_settings('gmt_offset') * 3600);
$time_adj = time() + (get_option('gmt_offset') * 3600);
$post_date = ($for_post) ? $post->post_date : $comment->comment_date;
$jj = ($edit) ? mysql2date('d', $post_date) : gmdate('d', $time_adj);
$mm = ($edit) ? mysql2date('m', $post_date) : gmdate('m', $time_adj);
Expand Down Expand Up @@ -1623,8 +1623,8 @@ function validate_file_to_edit($file, $allowed_files = '') {
}

function get_home_path() {
$home = get_settings('home');
if ($home != '' && $home != get_settings('siteurl')) {
$home = get_option('home');
if ($home != '' && $home != get_option('siteurl')) {
$home_path = parse_url($home);
$home_path = $home_path['path'];
$root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"]);
Expand Down
8 changes: 4 additions & 4 deletions wp-admin/admin-header.php
Expand Up @@ -15,9 +15,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
<script type="text/javascript">
//<![CDATA[
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
Expand All @@ -41,9 +41,9 @@ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}el
</head>
<body>
<div id="wphead">
<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site &raquo;') ?></a>)</span></h1>
<h1><?php echo wptexturize(get_option(('blogname'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site &raquo;') ?></a>)</span></h1>
</div>
<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div>
<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div>

<?php
require(ABSPATH . '/wp-admin/menu-header.php');
Expand Down
8 changes: 4 additions & 4 deletions wp-admin/admin.php
Expand Up @@ -19,10 +19,10 @@

wp_get_current_user();

$posts_per_page = get_settings('posts_per_page');
$what_to_show = get_settings('what_to_show');
$date_format = get_settings('date_format');
$time_format = get_settings('time_format');
$posts_per_page = get_option('posts_per_page');
$what_to_show = get_option('what_to_show');
$date_format = get_option('date_format');
$time_format = get_option('time_format');

wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback'));

Expand Down
2 changes: 1 addition & 1 deletion wp-admin/bookmarklet.php
Expand Up @@ -50,7 +50,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" />

<style type="text/css">
Expand Down
12 changes: 6 additions & 6 deletions wp-admin/comment.php
Expand Up @@ -62,7 +62,7 @@
echo "</table>\n";
echo "<p>" . __('Are you sure you want to do that?') . "</p>\n";

echo "<form action='".get_settings('siteurl')."/wp-admin/comment.php' method='get'>\n";
echo "<form action='".get_option('siteurl')."/wp-admin/comment.php' method='get'>\n";
wp_nonce_field($nonce_action);
echo "<input type='hidden' name='action' value='$formaction' />\n";
if ( 'spam' == $_GET['delete_type'] )
Expand All @@ -72,7 +72,7 @@
echo "<input type='hidden' name='noredir' value='1' />\n";
echo "<input type='submit' value='" . __('Yes') . "' />";
echo "&nbsp;&nbsp;";
echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit-comments.php';\" />\n";
echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_option('siteurl') ."/wp-admin/edit-comments.php';\" />\n";
echo "</form>\n";
echo "</div>\n";

Expand Down Expand Up @@ -106,7 +106,7 @@
if ((wp_get_referer() != '') && (false == $noredir)) {
wp_redirect(wp_get_referer());
} else {
wp_redirect(get_settings('siteurl') .'/wp-admin/edit-comments.php');
wp_redirect(get_option('siteurl') .'/wp-admin/edit-comments.php');
}
exit();
break;
Expand All @@ -133,7 +133,7 @@
if ((wp_get_referer() != "") && (false == $noredir)) {
wp_redirect(wp_get_referer());
} else {
wp_redirect(get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
wp_redirect(get_option('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
}
exit();
break;
Expand All @@ -156,15 +156,15 @@
wp_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );

wp_set_comment_status($comment->comment_ID, "approve");
if (get_settings("comments_notify") == true) {
if (get_option("comments_notify") == true) {
wp_notify_postauthor($comment->comment_ID);
}


if ((wp_get_referer() != "") && (false == $noredir)) {
wp_redirect(wp_get_referer());
} else {
wp_redirect(get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
wp_redirect(get_option('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
}
exit();
break;
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/edit-form-advanced.php
Expand Up @@ -75,7 +75,7 @@ function focusit() {
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
<div class="dbx-content">
<p id="jaxcat"></p>
<ul id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></ul></div>
<ul id="categorychecklist"><?php dropdown_categories(get_option('default_category')); ?></ul></div>
</fieldset>

<fieldset id="commentstatusdiv" class="dbx-box">
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/edit-form.php
Expand Up @@ -34,7 +34,7 @@ function focusit() { // focus on first input field
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
<?php the_quicktags(); ?>
<?php
$rows = get_settings('default_post_edit_rows');
$rows = get_option('default_post_edit_rows');
if (($rows < 3) || ($rows > 100)) {
$rows = 10;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/edit-link-form.php
Expand Up @@ -43,7 +43,7 @@ function xfn_check($class, $value = '', $type = 'check') {
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
<div class="dbx-content">
<p id="jaxcat"></p>
<ul id="categorychecklist"><?php dropdown_link_categories(get_settings('default_link_category')); ?></ul>
<ul id="categorychecklist"><?php dropdown_link_categories(get_option('default_link_category')); ?></ul>
</div>
</fieldset>

Expand Down
2 changes: 1 addition & 1 deletion wp-admin/export.php
Expand Up @@ -28,7 +28,7 @@ function export_wp() {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header("Content-Disposition: attachment; filename=$filename");
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
//$posts = query_posts('');
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC");
?>
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/import/blogger.php
Expand Up @@ -601,7 +601,7 @@ function start() {
if ( isset($_GET['noheader']) ) {
header('Content-Type: text/html; charset=utf-8');

$this->import = get_settings('import-blogger');
$this->import = get_option('import-blogger');

if ( false === $this->import ) {
$step = 0;
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/inline-uploading.php
Expand Up @@ -283,7 +283,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title></title>
<meta http-equiv="imagetoolbar" content="no" />
<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/link-add.php
Expand Up @@ -27,7 +27,7 @@
?>

<div class="wrap">
<?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you&#8217;re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
<?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you&#8217;re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
</div>

<?php
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/list-manipulation-js.php
@@ -1,7 +1,7 @@
<?php
require_once('admin.php');
cache_javascript_headers();
$handler = get_settings( 'siteurl' ) . '/wp-admin/admin-ajax.php';
$handler = get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php';
?>
addLoadEvent(function(){theList=new listMan();});
function deleteSomething(what,id,message,obj){if(!obj)obj=theList;if(!message)message="<?php printf(__('Are you sure you want to delete this %s?'),"'+what+'"); ?>";if(confirm(message))return obj.ajaxDelete(what,id);else return false;}
Expand Down
10 changes: 5 additions & 5 deletions wp-admin/menu-header.php
Expand Up @@ -13,9 +13,9 @@

if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") )
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
else
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
}
}

Expand All @@ -42,11 +42,11 @@

if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) {
if ( 'admin.php' == $pagenow )
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
else
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
} else {
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
}
endforeach;
?>
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/moderation.php
Expand Up @@ -47,7 +47,7 @@
break;
case 'approve':
wp_set_comment_status($key, 'approve');
if ( get_settings('comments_notify') == true ) {
if ( get_option('comments_notify') == true ) {
wp_notify_postauthor($key);
}
++$item_approved;
Expand Down Expand Up @@ -125,7 +125,7 @@
$i = 0;
foreach($comments as $comment) {
++$i;
$comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date);
$comment_date = mysql2date(get_option("date_format") . " @ " . get_option("time_format"), $comment->comment_date);
$post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID='$comment->comment_post_ID'");
if ($i % 2) $class = 'js-unapproved alternate';
else $class = 'js-unapproved';
Expand Down
20 changes: 10 additions & 10 deletions wp-admin/options-discussion.php
Expand Up @@ -27,17 +27,17 @@
<ul>
<li>
<label for="default_pingback_flag">
<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_settings('default_pingback_flag')); ?> />
<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
<?php _e('Attempt to notify any Weblogs linked to from the article (slows down posting.)') ?></label>
</li>
<li>
<label for="default_ping_status">
<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_settings('default_ping_status')); ?> />
<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
<?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks.)') ?></label>
</li>
<li>
<label for="default_comment_status">
<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_settings('default_comment_status')); ?> />
<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
<?php _e('Allow people to post comments on the article') ?></label>
</li>
</ul>
Expand All @@ -47,12 +47,12 @@
<ul>
<li>
<label for="comments_notify">
<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_settings('comments_notify')); ?> />
<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
<?php _e('Anyone posts a comment') ?> </label>
</li>
<li>
<label for="moderation_notify">
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_settings('moderation_notify')); ?> />
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
<?php _e('A comment is held for moderation') ?> </label>
</li>
</ul>
Expand All @@ -62,16 +62,16 @@
<ul>
<li>
<label for="comment_moderation">
<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_settings('comment_moderation')); ?> />
<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
<?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label>
</li>
<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_settings('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_settings('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
</ul>
</fieldset>
<fieldset class="options">
<legend><?php _e('Comment Moderation') ?></legend>
<p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_settings('comment_max_links'). '" />' ) ?></p>
<p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></p>

<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://codex.wordpress.org/Spam_Words">Common spam words</a>.') ?></p>
<p>
Expand All @@ -88,7 +88,7 @@
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
</p>
<p><label for="open_proxy_check">
<input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_settings('open_proxy_check')); ?> />
<input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_option('open_proxy_check')); ?> />
<?php _e('Blacklist comments from open and insecure proxies.') ?></label></p>
</fieldset>
<p class="submit">
Expand Down

0 comments on commit a3fd544

Please sign in to comment.