Action hook 'customize_render_partials_after'

in WP Core File wp-includes/customize/class-wp-customize-selective-refresh.php at line 393

View Source

customize_render_partials_after

Action Hook
Description
Fires immediately after partials are rendered. Plugins may do things like call wp_footer() to scrape scripts output and return them via the {@see 'customize_render_partials_response'} filter.

Hook Information

File Location wp-includes/customize/class-wp-customize-selective-refresh.php View on GitHub
Hook Type Action
Line Number 393

Hook Parameters

Type Name Description
WP_Customize_Selective_Refresh $refresh Selective refresh component.
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.

Usage Examples

Basic Usage
<?php
// Hook into customize_render_partials_after
add_action('customize_render_partials_after', 'my_custom_function', 10, 2);

function my_custom_function($refresh, $partials) {
    // Your custom code here
}

Source Code Context

wp-includes/customize/class-wp-customize-selective-refresh.php:393 - How this hook is used in WordPress core
<?php
 388  		 * @param WP_Customize_Selective_Refresh $refresh  Selective refresh component.
 389  		 * @param array                          $partials Placements' context data for the partials rendered in the request.
 390  		 *                                                 The array is keyed by partial ID, with each item being an array of
 391  		 *                                                 the placements' context data.
 392  		 */
 393  		do_action( 'customize_render_partials_after', $this, $partials );
 394  
 395  		$response = array(
 396  			'contents' => $contents,
 397  		);
 398  

PHP Documentation

<?php
/**
		 * Fires immediately after partials are rendered.
		 *
		 * Plugins may do things like call wp_footer() to scrape scripts output and return them
		 * via the {@see 'customize_render_partials_response'} filter.
		 *
		 * @since 4.5.0
		 *
		 * @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.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-includes/customize/class-wp-customize-selective-refresh.php
Related Hooks

Related hooks will be displayed here in future updates.