customize_partial_render_{$partial->id} WordPress Filter Hook
This hook allows you to modify the data that will be used to render a partial template. The data is passed to the hook as an array and can be modified as needed before being returned. This is particularly useful if you need to change the data based on the context in which the partial is being rendered. For example, you could use this hook to modify a partial that is being used as a sidebar widget so that it only displays data for the current page.
apply_filters( "customize_partial_render_{$partial->id}", string|array|false $rendered , WP_Customize_Partial $partial , array $container_context ) #
Filters partial rendering for a specific partial.
Description
The dynamic portion of the hook name, $partial->ID
refers to the partial ID.
Parameters
- $rendered
(string|array|false)The partial value. Default false.
- $partial
(WP_Customize_Partial)WP_Customize_Setting instance.
- $container_context
(array)array of context data associated with the target container.
Source
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |