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.


Top ↑

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.


Top ↑

Source

File: wp-includes/customize/class-wp-customize-partial.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.