Fix return error in get_theme_mods() from [32629].

Split a line with both an assignment and a conditional, not to mention an interpolated variable. Lots going on, easy mistake to make.

props BrianLayman.
fixes #32516.


git-svn-id: https://develop.svn.wordpress.org/trunk@32632 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2015-05-28 05:50:40 +00:00
parent 7aef782aa8
commit e0cfefaa5e
2 changed files with 7 additions and 6 deletions

View File

@@ -900,7 +900,8 @@ function validate_current_theme() {
*/
function get_theme_mods() {
$theme_slug = get_option( 'stylesheet' );
if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) {
$mods = get_option( "theme_mods_$theme_slug" );
if ( false === $mods ) {
$theme_name = get_option( 'current_theme' );
if ( false === $theme_name )
$theme_name = wp_get_theme()->get('Name');
@@ -909,8 +910,8 @@ function get_theme_mods() {
update_option( "theme_mods_$theme_slug", $mods );
delete_option( "mods_$theme_name" );
}
return $mods;
}
return $mods;
}
/**