WordPress.org

Make WordPress Core

Ticket #34597: 34597.0.diff

File 34597.0.diff, 908 bytes (added by westonruter, 5 years ago)
  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index f8bab30..ba310cc 100644
    final class WP_Customize_Manager { 
    985985                if ( $id instanceof WP_Customize_Setting ) {
    986986                        $setting = $id;
    987987                } else {
    988                         $setting = new WP_Customize_Setting( $this, $id, $args );
     988                        $class = 'WP_Customize_Setting';
     989
     990                        /** This filter is documented in wp-includes/class-wp-customize-manager.php */
     991                        $args = apply_filters( 'customize_dynamic_setting_args', $args, $id );
     992
     993                        /** This filter is documented in wp-includes/class-wp-customize-manager.php */
     994                        $class = apply_filters( 'customize_dynamic_setting_class', $class, $id, $args );
     995
     996                        $setting = new $class( $this, $id, $args );
    989997                }
    990998                $this->settings[ $setting->id ] = $setting;
    991999        }