Title: customize_dynamic_partial_class
Published: April 12, 2016
Last modified: August 20, 2026

---

# apply_filters( ‘customize_dynamic_partial_class’, string $partial_class, string $partial_id, array $partial_args )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#changelog)

Filters the class used to construct partials.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#description)󠁿

Allow non-statically created partials to be constructed with custom [WP_Customize_Partial](https://developer.wordpress.org/reference/classes/wp_customize_partial/)
subclass.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#parameters)󠁿

 `$partial_class`string

[WP_Customize_Partial](https://developer.wordpress.org/reference/classes/wp_customize_partial/)
or a subclass.

`$partial_id`string

ID for dynamic partial.

`$partial_args`array

The arguments to the [WP_Customize_Partial](https://developer.wordpress.org/reference/classes/wp_customize_partial/)
constructor.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#source)󠁿

    ```php
    $partial_class = apply_filters( 'customize_dynamic_partial_class', $partial_class, $partial_id, $partial_args );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/customize/class-wp-customize-selective-refresh.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/customize/class-wp-customize-selective-refresh.php#L247)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/customize/class-wp-customize-selective-refresh.php#L247-L247)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Customize_Selective_Refresh::add_dynamic_partials()](https://developer.wordpress.org/reference/classes/wp_customize_selective_refresh/add_dynamic_partials/)`wp-includes/customize/class-wp-customize-selective-refresh.php` |

Registers dynamically-created partials.

  | 
| [WP_Customize_Selective_Refresh::add_partial()](https://developer.wordpress.org/reference/classes/wp_customize_selective_refresh/add_partial/)`wp-includes/customize/class-wp-customize-selective-refresh.php` |

Adds a partial.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/customize_dynamic_partial_class/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.5.0](https://developer.wordpress.org/reference/since/4.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcustomize_dynamic_partial_class%2F)
before being able to contribute a note or feedback.