mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Small cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@3068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f6fd138e51
commit
f1951d856a
@ -267,17 +267,15 @@ function get_settings($setting) {
|
|||||||
if ( false === $value ) {
|
if ( false === $value ) {
|
||||||
if ( defined('WP_INSTALLING') )
|
if ( defined('WP_INSTALLING') )
|
||||||
$wpdb->hide_errors();
|
$wpdb->hide_errors();
|
||||||
$value = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
|
$value = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1");
|
||||||
if ( defined('WP_INSTALLING') )
|
if ( defined('WP_INSTALLING') )
|
||||||
$wpdb->show_errors();
|
$wpdb->show_errors();
|
||||||
|
|
||||||
if( is_object( $value ) ) {
|
if( $value )
|
||||||
$value = $value->option_value;
|
|
||||||
wp_cache_set($setting, $value, 'options');
|
wp_cache_set($setting, $value, 'options');
|
||||||
} else {
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If home is not set use siteurl.
|
// If home is not set use siteurl.
|
||||||
if ( 'home' == $setting && '' == $value )
|
if ( 'home' == $setting && '' == $value )
|
||||||
|
Loading…
Reference in New Issue
Block a user