Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: customize_dynamic_setting_class

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
875                /**
876                 * Allow non-statically created settings to be constructed with custom WP_Customize_Setting subclass.
877                 *
878                 * @since 4.2.0
879                 *
880                 * @param string $setting_class WP_Customize_Setting or a subclass.
881                 * @param string $setting_id    ID for dynamic setting, usually coming from `$_POST['customized']`.
882                 * @param string $setting_args  WP_Customize_Setting or a subclass.
883                 */
884                $setting_class = apply_filters( 'customize_dynamic_setting_class', $setting_class, $setting_id, $setting_args );
885
886                $setting = new $setting_class( $this, $setting_id, $setting_args );
887
888                $this->add_setting( $setting );
889                $new_settings[] = $setting;
890           }
891           return $new_settings;
892      }
893