Index: wp-admin/includes/class-wp-themes-list-table.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-admin/includes/class-wp-themes-list-table.php	(revision f3b3ece76a3223af6f9646d15597d773a0e5a08d)
+++ wp-admin/includes/class-wp-themes-list-table.php	(revision )
@@ -65,7 +65,7 @@
 			}
 		}
 
-		unset( $themes[ get_option( 'stylesheet' ) ] );
+		unset( $themes[ get_stylesheet() ] );
 		WP_Theme::sort_by_name( $themes );
 
 		$per_page = 36;
Index: wp-admin/network/themes.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-admin/network/themes.php	(revision f3b3ece76a3223af6f9646d15597d773a0e5a08d)
+++ wp-admin/network/themes.php	(revision )
@@ -102,7 +102,7 @@
 				exit;
 			}
 
-			$themes = array_diff( $themes, array( get_option( 'stylesheet' ), get_option( 'template' ) ) );
+			$themes = array_diff( $themes, array( get_stylesheet(), get_template() ) );
 
 			if ( empty( $themes ) ) {
 				wp_safe_redirect( add_query_arg( 'error', 'main', $referer ) );
Index: wp-admin/includes/class-wp-ms-themes-list-table.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-admin/includes/class-wp-ms-themes-list-table.php	(revision f3b3ece76a3223af6f9646d15597d773a0e5a08d)
+++ wp-admin/includes/class-wp-ms-themes-list-table.php	(revision )
@@ -462,7 +462,7 @@
 			);
 		}
 
-		if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) {
+		if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_stylesheet() && $stylesheet != get_template() ) {
 			$url = add_query_arg( array(
 				'action'       => 'delete-selected',
 				'checked[]'    => $theme_key,
Index: wp-includes/update.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/update.php	(revision f3b3ece76a3223af6f9646d15597d773a0e5a08d)
+++ wp-includes/update.php	(revision )
@@ -370,8 +370,9 @@
 	$themes = $checked = $request = array();
 
 	// Put slug of current theme into request.
-	$request['active'] = get_option( 'stylesheet' );
+	$request['active'] = get_stylesheet();
 
+	/** @var WP_Theme $theme */
 	foreach ( $installed_themes as $theme ) {
 		$checked[ $theme->get_stylesheet() ] = $theme->get('Version');
 
Index: wp-admin/includes/schema.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-admin/includes/schema.php	(revision f3b3ece76a3223af6f9646d15597d773a0e5a08d)
+++ wp-admin/includes/schema.php	(revision )
@@ -922,8 +922,8 @@
 	}
 
 	// Set up site tables.
-	$template = get_option( 'template' );
-	$stylesheet = get_option( 'stylesheet' );
+	$template = get_template();
+	$stylesheet = get_stylesheet();
 	$allowed_themes = array( $stylesheet => true );
 
 	if ( $template != $stylesheet ) {
