WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
117 | if ( $id instanceof WP_Customize_Partial ) { |
118 | $partial = $id; |
119 | } else { |
120 | $class = 'WP_Customize_Partial'; |
121 |
|
122 | /** This filter is documented in wp-includes/customize/class-wp-customize-selective-refresh.php */ |
123 | $args = apply_filters( 'customize_dynamic_partial_args', $args, $id ); |
124 |
|
125 | /** This filter is documented in wp-includes/customize/class-wp-customize-selective-refresh.php */ |
126 | $class = apply_filters( 'customize_dynamic_partial_class', $class, $id, $args ); |
127 |
|
128 | $partial = new $class( $this, $id, $args ); |
129 | } |
130 |
|
131 | $this->partials[ $partial->id ] = $partial; |
132 | return $partial; |
133 | } |
134 |
|
135 | /** |
Line | Code |
269 | * |
270 | * Allow non-statically created partials to be constructed with custom WP_Customize_Partial subclass. |
271 | * |
272 | * @since 4.5.0 |
273 | * |
274 | * @param string $partial_class WP_Customize_Partial or a subclass. |
275 | * @param string $partial_id ID for dynamic partial. |
276 | * @param array $partial_args The arguments to the WP_Customize_Partial constructor. |
277 | */ |
278 | $partial_class = apply_filters( 'customize_dynamic_partial_class', $partial_class, $partial_id, $partial_args ); |
279 |
|
280 | $partial = new $partial_class( $this, $partial_id, $partial_args ); |
281 |
|
282 | $this->add_partial( $partial ); |
283 | $new_partials[] = $partial; |
284 | } |
285 | return $new_partials; |
286 | } |
287 |
|