Make WordPress Core

Ticket #28637: 28637.2.diff

File 28637.2.diff, 614 bytes (added by valendesigns, 10 years ago)

Changed to be compliant with the Handbook Brace Style.

  • src/wp-includes/theme.php

    diff --git src/wp-includes/theme.php src/wp-includes/theme.php
    index 038310d..58121cb 100644
    function set_theme_mod( $name, $value ) { 
    953953         * @param string $old_value The current value of the theme mod.
    954954         */
    955955        $mods[ $name ] = apply_filters( "pre_set_theme_mod_$name", $value, $old_value );
    956 
     956       
     957        // If the new value is empty, remove it entirely so that get_theme_mod() returns false
     958        if ( '' === $value ) {
     959                unset( $mods[ $name ] );
     960        }
     961       
    957962        $theme = get_option( 'stylesheet' );
    958963        update_option( "theme_mods_$theme", $mods );
    959964}