﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
9152,Custom header from theme A used when previewing theme B,Viper007Bond,westi,"As reported by Matt.

If you're using theme A and set a custom header via the standardized API (i.e. a background image and text color) and then preview theme B on the theme switcher, the settings from theme A are used. Once you actually switch themes though, it works fine and uses the settings from theme B.

The problem stems from `get_current_theme()` returning theme A even when previewing theme B.

{{{
#!php
function get_theme_mod($name, $default = false) {
	$theme = get_current_theme();

	$mods = get_option(""mods_$theme"");

	if ( isset($mods[$name]) )
		return apply_filters( ""theme_mod_$name"", $mods[$name] );

	return apply_filters( ""theme_mod_$name"", sprintf($default, get_template_directory_uri(), get_stylesheet_directory_uri()) );
}
}}}

Still working on a solution to this (i.e. telling WordPress it's using theme B during the preview or something).",defect (bug),closed,normal,2.8,Themes,2.7,normal,fixed,has-patch needs-testing,
