wpseek.com
WordPress开发者和主题制作者的搜索引擎
customize_render_partials_response › WordPress过滤钩子
Since4.5.0
已弃用n/a
› apply_filters( 'customize_render_partials_response', $response, $this, $partials )
参数: (3) |
|
定义在: | |
文档: |
Filters the response from rendering the partials.
Plugins may use this filter to inject $scripts
and $styles
, which are dependencies
for the partials being rendered. The response data will be available to the client via
the render-partials-response
JS event, so the client can then inject the scripts and
styles into the DOM if they have not already been enqueued there.
If plugins do this, they'll need to take care for any scripts that do document.write()
and make sure that these are not injected, or else to override the function to no-op,
or else the page will be destroyed.
Plugins should be aware that $scripts
and $styles
may eventually be included by
default in the response.
Related Functions: wp_make_content_images_responsive, _customizer_mobile_viewport_meta, _wp_customize_publish_changeset, get_custom_header_markup, is_customize_preview, the_custom_header_markup