customize_render_control_<id>
Fires just before a specific Customizer control is rendered.
Description
The dynamic portion(s) of the hook name refer to the control ID.
Parameters (1)
- 0. $instance (WP_Customize_Control)
-
WP_Customize_Control
instance.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'customize_render_control_{$id}', $instance );
- The following example is for adding a hook callback.
- // define the customize_render_control_<id> callback
- function action_customize_render_control_id( $instance ) {
- // make action magic happen here...
- };
- // add the action
- add_action( "customize_render_control_{$id}", 'action_customize_render_control_id', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( "customize_render_control_{$id}", 'action_customize_render_control_id', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/class-wp-customize-control.php
- do_action( "customize_render_control_{$this->id}", $this );