Make WordPress Core


Ignore:
Timestamp:
05/28/2015 05:50:40 AM (9 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r32629 r32632  
    901901function get_theme_mods() {
    902902    $theme_slug = get_option( 'stylesheet' );
    903     if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) {
     903    $mods = get_option( "theme_mods_$theme_slug" );
     904    if ( false === $mods ) {
    904905        $theme_name = get_option( 'current_theme' );
    905906        if ( false === $theme_name )
     
    910911            delete_option( "mods_$theme_name" );
    911912        }
    912         return $mods;
    913     }
     913    }
     914    return $mods;
    914915}
    915916
Note: See TracChangeset for help on using the changeset viewer.