customize_render_partials_before action-hookWP 4.5.0

Fires immediately before partials are rendered.

Plugins may do things like call wp_enqueue_scripts() and gather a list of the scripts and styles which may get enqueued in the response.

Usage

add_action( 'customize_render_partials_before', 'wp_kama_customize_render_partials_before_action', 10, 2 );

/**
 * Function for `customize_render_partials_before` action-hook.
 * 
 * @param WP_Customize_Selective_Refresh $refresh  Selective refresh component.
 * @param array                          $partials Placements' context data for the partials rendered in the request. The array is keyed by partial ID, with each item being an array of the placements' context data.
 *
 * @return void
 */
function wp_kama_customize_render_partials_before_action( $refresh, $partials ){

	// action...
}
$refresh(WP_Customize_Selective_Refresh)
Selective refresh component.
$partials(array)
Placements' context data for the partials rendered in the request. The array is keyed by partial ID, with each item being an array of the placements' context data.

Changelog

Since 4.5.0 Introduced.

Where the hook is called

WP_Customize_Selective_Refresh::handle_render_partials_request()
customize_render_partials_before
wp-includes/customize/class-wp-customize-selective-refresh.php 344
do_action( 'customize_render_partials_before', $this, $partials );

Where the hook is used in WordPress

Usage not found.