In set_theme_mod() account for when there is no old value.

fixes #14721. see [27393].


git-svn-id: https://develop.svn.wordpress.org/trunk@27402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-03-05 01:12:39 +00:00
parent ce69c629ff
commit 6afe83e3ca

View File

@ -913,7 +913,7 @@ function get_theme_mod( $name, $default = false ) {
*/
function set_theme_mod( $name, $value ) {
$mods = get_theme_mods();
$old_value = $mods[ $name ];
$old_value = isset( $mods[ $name ] ) ? $mods[ $name ] : false;
/**
* Filter the theme mod value on save.