WordPress.org

Make WordPress Core

Ticket #36452: 36452.diff

File 36452.diff, 956 bytes (added by celloexpressions, 3 years ago)

Pass $this to the customize_value_ filter.

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

     
    645645                         *
    646646                         * @since 3.4.0
    647647                         *
    648                          * @param mixed $default The setting default value. Default empty.
     648                         * @param mixed                $default The setting default value. Default empty.
     649                         * @param WP_Customize_Setting $this    {@see WP_Customize_Setting} instance.
    649650                         */
    650                         $value = apply_filters( "customize_value_{$id_base}", $value );
     651                        $value = apply_filters( "customize_value_{$id_base}", $value, $this );
    651652                } else if ( $this->is_multidimensional_aggregated ) {
    652653                        $root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
    653654                        $value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );