mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Migrating more of the global options to get_settings().
git-svn-id: http://svn.automattic.com/wordpress/trunk@955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9fc821da98
commit
9e718aff7a
@ -89,7 +89,7 @@ window.onload = focusit;
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="Help with post field">Post</a></legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
if ($use_quicktags) {
|
||||
if ( get_settings('use_quicktags') ) {
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="Help with quicktags">Quicktags</a>: ';
|
||||
include('quicktags.php');
|
||||
}
|
||||
@ -105,7 +105,7 @@ if ($use_quicktags) {
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
if ($use_quicktags) {
|
||||
if ( get_settings('use_quicktags') ) {
|
||||
?>
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
<!--
|
||||
|
@ -43,7 +43,7 @@ window.onload = focusit;
|
||||
<legend>Comment</legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
if ($use_quicktags) {
|
||||
if (get_settings('use_quicktags')) {
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="Help with quicktags">Quicktags</a>: ';
|
||||
include('quicktags.php');
|
||||
}
|
||||
@ -59,7 +59,7 @@ if ($use_quicktags) {
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
if ($use_quicktags) {
|
||||
if (get_settings('use_quicktags')) {
|
||||
?>
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
<!--
|
||||
|
@ -75,7 +75,7 @@ window.onload = focusit;
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="Help with post field">Post</a></legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
if ($use_quicktags && 'bookmarklet' != $mode) {
|
||||
if (get_settings('use_quicktags') && 'bookmarklet' != $mode) {
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="Help with quicktags">Quicktags</a>: ';
|
||||
include('quicktags.php');
|
||||
}
|
||||
@ -91,7 +91,7 @@ if ($use_quicktags && 'bookmarklet' != $mode) {
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
if ($use_quicktags) {
|
||||
if (get_settings('use_quicktags')) {
|
||||
?>
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
<!--
|
||||
|
@ -707,6 +707,7 @@ function upgrade_110() {
|
||||
}
|
||||
|
||||
$wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 6");
|
||||
$wpdb->query("DELETE FROM $tableoptiongroups WHERE group_id = 7");
|
||||
|
||||
// Add blog_charset option
|
||||
if(!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'blog_charset'")) {
|
||||
|
@ -70,6 +70,7 @@ case 'adduser':
|
||||
$user_firstname = addslashes(stripslashes($user_firstname));
|
||||
$user_lastname = addslashes(stripslashes($user_lastname));
|
||||
$now = gmdate('Y-m-d H:i:s');
|
||||
$new_users_can_blog = get_settings('new_users_can_blog');
|
||||
|
||||
$result = $wpdb->query("INSERT INTO $tableusers
|
||||
(user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_idmode, user_firstname, user_lastname, user_nicename)
|
||||
|
@ -294,12 +294,7 @@ function make_clickable($text) { // original function: phpBB, extended here for
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function convert_bbcode($content) {
|
||||
global $wp_bbcode, $use_bbcode;
|
||||
if ($use_bbcode) {
|
||||
$content = preg_replace($wp_bbcode["in"], $wp_bbcode["out"], $content);
|
||||
}
|
||||
$content = convert_bbcode_email($content);
|
||||
function convert_bbcode($content) { // depreciated
|
||||
return $content;
|
||||
}
|
||||
|
||||
@ -318,11 +313,7 @@ function convert_bbcode_email($content) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
function convert_gmcode($content) {
|
||||
global $wp_gmcode, $use_gmcode;
|
||||
if ($use_gmcode) {
|
||||
$content = preg_replace($wp_gmcode["in"], $wp_gmcode["out"], $content);
|
||||
}
|
||||
function convert_gmcode($content) { // depreciated
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ function bloginfo_unicode($show='') {
|
||||
}
|
||||
|
||||
function get_bloginfo($show='') {
|
||||
global $blogname, $blogdescription, $admin_email;
|
||||
global $blogname, $admin_email;
|
||||
|
||||
$do_perma = 0;
|
||||
$feed_url = get_settings('siteurl');
|
||||
@ -39,7 +39,7 @@ function get_bloginfo($show='') {
|
||||
$output = get_settings('siteurl') .'/'. get_settings('blogfilename');
|
||||
break;
|
||||
case 'description':
|
||||
$output = $blogdescription;
|
||||
$output = get_settings('blogdescription');
|
||||
break;
|
||||
case 'rdf_url':
|
||||
$output = get_settings('siteurl') .'/wp-rdf.php';
|
||||
|
@ -281,7 +281,7 @@ default:
|
||||
<div id="login">
|
||||
<p>
|
||||
<a href="<?php echo get_settings('siteurl'); ?>" title="Are you lost?">Back to blog?</a><br />
|
||||
<?php if ($users_can_register) { ?>
|
||||
<?php if (get_settings('users_can_register')) { ?>
|
||||
<a href="<?php echo get_settings('siteurl'); ?>/wp-register.php" title="Register to be an author">Register?</a><br />
|
||||
<?php } ?>
|
||||
<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
|
||||
|
@ -34,7 +34,7 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$users_can_register) {
|
||||
if (!get_settings('users_can_register')) {
|
||||
$action = 'disabled';
|
||||
}
|
||||
|
||||
@ -88,6 +88,7 @@ case 'register':
|
||||
$pass1 = addslashes($pass1);
|
||||
$user_nickname = addslashes($user_nickname);
|
||||
$now = gmdate('Y-m-d H:i:s');
|
||||
$new_users_can_blog = get_settings('new_users_can_blog');
|
||||
|
||||
$result = $wpdb->query("INSERT INTO $tableusers
|
||||
(user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_idmode)
|
||||
|
@ -50,15 +50,9 @@ require_once (ABSPATH . WPINC . '/kses.php');
|
||||
// accessing a single global $all_settings var
|
||||
if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/import')) {
|
||||
$blogname = get_settings('blogname');
|
||||
$blogdescription = get_settings('blogdescription');
|
||||
$admin_email = get_settings('admin_email');
|
||||
$new_users_can_blog = get_settings('new_users_can_blog');
|
||||
$users_can_register = get_settings('users_can_register');
|
||||
$blog_charset = get_settings('blog_charset');
|
||||
$start_of_week = get_settings('start_of_week');
|
||||
$use_bbcode = get_settings('use_bbcode');
|
||||
$use_gmcode = get_settings('use_gmcode');
|
||||
$use_quicktags = get_settings('use_quicktags');
|
||||
$use_htmltrans = get_settings('use_htmltrans');
|
||||
$use_balanceTags = get_settings('use_balanceTags');
|
||||
$use_fileupload = get_settings('use_fileupload');
|
||||
|
Loading…
Reference in New Issue
Block a user