WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/20/2017 06:49:11 AM (3 years ago)
Author:
dd32
Message:

Customize: Ensure root values are accessible in multidimensional custom setting types.

Fixes bad conditions in WP_Customize_Setting::get_root_value() and WP_Customize_Setting::set_root_value().

Props dlh, westonruter.
Amends [35007].
Merges [40036] to the 4.7 branch.
See #32103.
Fixes #36952.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/class-wp-customize-setting.php

    r39318 r40088  
    586586        if ( 'option' === $this->type ) {
    587587            return get_option( $id_base, $default );
    588         } else if ( 'theme_mod' ) {
     588        } elseif ( 'theme_mod' === $this->type ) {
    589589            return get_theme_mod( $id_base, $default );
    590590        } else {
     
    615615            }
    616616            return update_option( $id_base, $value, $autoload );
    617         } else if ( 'theme_mod' ) {
     617        } elseif ( 'theme_mod' === $this->type ) {
    618618            set_theme_mod( $id_base, $value );
    619619            return true;
Note: See TracChangeset for help on using the changeset viewer.