customize_partial_render_{$partial->id}
Filter HookDescription
Filters partial rendering for a specific partial. The dynamic portion of the hook name, `$partial->ID` refers to the partial ID.Hook Information
File Location |
wp-includes/customize/class-wp-customize-partial.php
View on GitHub
|
Hook Type | Filter |
Line Number | 260 |
Hook Parameters
Type | Name | Description |
---|---|---|
string|array|false
|
$rendered
|
The partial value. Default false. |
WP_Customize_Partial
|
$partial
|
WP_Customize_Setting instance. |
array
|
$container_context
|
Optional array of context data associated with the target container. |
Usage Examples
Basic Usage
<?php
// Hook into customize_partial_render_{$partial->id}
add_filter('customize_partial_render_{$partial->id}', 'my_custom_filter', 10, 3);
function my_custom_filter($rendered, $partial, $container_context) {
// Your custom filtering logic here
return $rendered;
}
Source Code Context
wp-includes/customize/class-wp-customize-partial.php:260
- How this hook is used in WordPress core
<?php
255 * @param string|array|false $rendered The partial value. Default false.
256 * @param WP_Customize_Partial $partial WP_Customize_Setting instance.
257 * @param array $container_context Optional array of context data associated with
258 * the target container.
259 */
260 $rendered = apply_filters( "customize_partial_render_{$partial->id}", $rendered, $partial, $container_context );
261
262 return $rendered;
263 }
264
265 /**
PHP Documentation
<?php
/**
* Filters partial rendering for a specific partial.
*
* The dynamic portion of the hook name, `$partial->ID` refers to the partial ID.
*
* @since 4.5.0
*
* @param string|array|false $rendered The partial value. Default false.
* @param WP_Customize_Partial $partial WP_Customize_Setting instance.
* @param array $container_context Optional array of context data associated with
* the target container.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/customize/class-wp-customize-partial.php
Related Hooks
Related hooks will be displayed here in future updates.