customize_dynamic_partial_args WordPress Filter Hook

The customize_dynamic_partial_args hook allows you to change the arguments that are passed to a dynamic partial when it is rendered. This can be useful if you want to change the behavior of the partial based on certain conditions. For example, you could use this hook to change the number of items that are displayed in a partial based on the current page.

apply_filters( 'customize_dynamic_partial_args', false|array $partial_args, string $partial_id ) #

Filters a dynamic partial’s constructor arguments.


Description

For a dynamic partial to be registered, this filter must be employed to override the default false value with an array of args to pass to the WP_Customize_Partial constructor.


Top ↑

Parameters

$partial_args

(false|array)The arguments to the WP_Customize_Partial constructor.

$partial_id

(string)ID for dynamic partial.


Top ↑

Source

File: wp-includes/customize/class-wp-customize-selective-refresh.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.