Index: wp-includes/class-wp-customize-manager.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/class-wp-customize-manager.php	(revision 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ wp-includes/class-wp-customize-manager.php	(revision )
@@ -568,8 +568,8 @@
 			add_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) );
 
 			// @link: https://core.trac.wordpress.org/ticket/20027
-			add_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) );
-			add_filter( 'pre_option_template', array( $this, 'get_template' ) );
+			add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
+			add_filter( 'template', array( $this, 'get_template' ) );
 
 			// Handle custom theme roots.
 			add_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) );
@@ -606,8 +606,8 @@
 			remove_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) );
 
 			// @link: https://core.trac.wordpress.org/ticket/20027
-			remove_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) );
-			remove_filter( 'pre_option_template', array( $this, 'get_template' ) );
+			remove_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
+			remove_filter( 'template', array( $this, 'get_template' ) );
 
 			// Handle custom theme roots.
 			remove_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) );
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 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ wp-admin/includes/schema.php	(revision )
@@ -921,8 +921,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 ) {
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 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ 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-includes/theme.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/theme.php	(revision 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ wp-includes/theme.php	(revision )
@@ -823,7 +823,7 @@
  * @return array|void Theme modifications.
  */
 function get_theme_mods() {
-	$theme_slug = get_option( 'stylesheet' );
+	$theme_slug = get_stylesheet();
 	$mods = get_option( "theme_mods_$theme_slug" );
 	if ( false === $mods ) {
 		$theme_name = get_option( 'current_theme' );
@@ -904,7 +904,7 @@
 	 */
 	$mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value );
 
-	$theme = get_option( 'stylesheet' );
+	$theme = get_stylesheet();
 	update_option( "theme_mods_$theme", $mods );
 }
 
@@ -930,7 +930,7 @@
 		remove_theme_mods();
 		return;
 	}
-	$theme = get_option( 'stylesheet' );
+	$theme = get_stylesheet();
 	update_option( "theme_mods_$theme", $mods );
 }
 
@@ -940,7 +940,7 @@
  * @since 2.1.0
  */
 function remove_theme_mods() {
-	delete_option( 'theme_mods_' . get_option( 'stylesheet' ) );
+	delete_option( 'theme_mods_' . get_stylesheet() );
 
 	// Old style.
 	$theme_name = get_option( 'current_theme' );
Index: wp-includes/update.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/update.php	(revision 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ wp-includes/update.php	(revision )
@@ -384,7 +384,7 @@
 	$themes = $checked = $request = array();
 
 	// Put slug of current theme into request.
-	$request['active'] = get_option( 'stylesheet' );
+	$request['active'] = get_stylesheet();
 
 	foreach ( $installed_themes as $theme ) {
 		$checked[ $theme->get_stylesheet() ] = $theme->get('Version');
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 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ wp-admin/network/themes.php	(revision )
@@ -99,7 +99,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 4efe32637e36f12c62573ba977bbd41f268549f7)
+++ wp-admin/includes/class-wp-ms-themes-list-table.php	(revision )
@@ -463,7 +463,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,
