Make WordPress Core

Ticket #34140: 34140.diff

File 34140.diff, 1.1 KB (added by westonruter, 9 years ago)
  • src/wp-includes/class-wp-customize-setting.php

    diff --git src/wp-includes/class-wp-customize-setting.php src/wp-includes/class-wp-customize-setting.php
    index 98f37f9..e560109 100644
    class WP_Customize_Setting { 
    304304         * @since 3.4.0
    305305         *
    306306         * @param mixed $value The value to update.
    307          * @return mixed The result of saving the value.
     307         * @return bool|mixed The result of saving the value.
    308308         */
    309309        protected function update( $value ) {
    310                 switch( $this->type ) {
     310                switch ( $this->type ) {
    311311                        case 'theme_mod' :
    312                                 return $this->_update_theme_mod( $value );
     312                                $this->_update_theme_mod( $value );
     313                                return true;
    313314
    314315                        case 'option' :
    315316                                return $this->_update_option( $value );
    class WP_Customize_Setting { 
    327328                                 * @param mixed                $value Value of the setting.
    328329                                 * @param WP_Customize_Setting $this  WP_Customize_Setting instance.
    329330                                 */
    330                                 return do_action( 'customize_update_' . $this->type, $value, $this );
     331                                do_action( 'customize_update_' . $this->type, $value, $this );
     332
     333                                return has_action( "customize_update_{$this->type}" );
    331334                }
    332335        }
    333336