customize_dynamic_partial_args
Filter HookDescription
Filters a dynamic partial's constructor arguments. 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.Hook Information
File Location |
wp-includes/customize/class-wp-customize-selective-refresh.php
View on GitHub
|
Hook Type | Filter |
Line Number | 235 |
Hook Parameters
Type | Name | Description |
---|---|---|
false|array
|
$partial_args
|
The arguments to the WP_Customize_Partial constructor. |
string
|
$partial_id
|
ID for dynamic partial. |
Usage Examples
Basic Usage
<?php
// Hook into customize_dynamic_partial_args
add_filter('customize_dynamic_partial_args', 'my_custom_filter', 10, 2);
function my_custom_filter($partial_args, $partial_id) {
// Your custom filtering logic here
return $partial_args;
}
Source Code Context
wp-includes/customize/class-wp-customize-selective-refresh.php:235
- How this hook is used in WordPress core
<?php
230 * @since 4.5.0
231 *
232 * @param false|array $partial_args The arguments to the WP_Customize_Partial constructor.
233 * @param string $partial_id ID for dynamic partial.
234 */
235 $partial_args = apply_filters( 'customize_dynamic_partial_args', $partial_args, $partial_id );
236 if ( false === $partial_args ) {
237 continue;
238 }
239
240 /**
PHP Documentation
<?php
/**
* Filters a dynamic partial's constructor arguments.
*
* 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.
*
* @since 4.5.0
*
* @param false|array $partial_args The arguments to the WP_Customize_Partial constructor.
* @param string $partial_id ID for dynamic partial.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/customize/class-wp-customize-selective-refresh.php
Related Hooks
Related hooks will be displayed here in future updates.