customize_partial_render_(partial_id) хук-фильтрWP 4.5.0

Filters partial rendering for a specific partial.

The dynamic portion of the hook name, $partial->ID refers to the partial ID.

Использование

add_filter( 'customize_partial_render_(partial_id)', 'wp_kama_customize_partial_render_id_filter', 10, 3 );

/**
 * Function for `customize_partial_render_(partial_id)` filter-hook.
 * 
 * @param string|array|false   $rendered          The partial value.
 * @param WP_Customize_Partial $partial           WP_Customize_Setting instance.
 * @param array                $container_context Optional array of context data associated with the target container.
 *
 * @return string|array|false
 */
function wp_kama_customize_partial_render_id_filter( $rendered, $partial, $container_context ){

	// filter...
	return $rendered;
}
$rendered(строка|массив|false)
The partial value.
По умолчанию: false
$partial(WP_Customize_Partial)
WP_Customize_Setting instance.
$container_context(массив)
Optional array of context data associated with the target container.

Список изменений

С версии 4.5.0 Введена.

Где вызывается хук

WP_Customize_Partial::render()
customize_partial_render_(partial_id)
wp-includes/customize/class-wp-customize-partial.php 259
$rendered = apply_filters( "customize_partial_render_{$partial->id}", $rendered, $partial, $container_context );

Где используется хук в WordPress

Использование не найдено.