Clean up is_blog_installed(), remove redundant or unnecessary code. see #8947
git-svn-id: https://develop.svn.wordpress.org/trunk@10974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bf48851d29
commit
c4dc6ef860
|
@ -1680,14 +1680,14 @@ function is_blog_installed() {
|
|||
|
||||
$suppress = $wpdb->suppress_errors();
|
||||
$alloptions = wp_load_alloptions();
|
||||
// If siteurl is not set to autoload, but other options are loaded, check if it's there
|
||||
if ( !isset($alloptions['siteurl']) && count($alloptions) > 1 )
|
||||
// If siteurl is not set to autoload, check it specifically
|
||||
if ( !isset( $alloptions['siteurl'] ) )
|
||||
$installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
|
||||
else
|
||||
$installed = $alloptions['siteurl'];
|
||||
$wpdb->suppress_errors( $suppress );
|
||||
|
||||
$installed = !empty( $installed ) ? true : false;
|
||||
$installed = !empty( $installed );
|
||||
wp_cache_set( 'is_blog_installed', $installed );
|
||||
|
||||
return $installed;
|
||||
|
|
Loading…
Reference in New Issue