customize_render_partials_before

動作鉤子
do_action( 'customize_render_partials_before', $this, $partials )
引數
  • (WP_Customize_Selective_Refresh) $refresh Selective refresh component.
    Required:
  • (array) $partials Placements' context data for the partials rendered in the request. The array is keyed by partial ID, with each item being an array of the placements' context data.
    Required:
定義位置
相關勾子
customize_render_partials_aftercustomize_render_partials_responsecustomize_partial_rendercustomize_dynamic_partial_argscustomize_render_control
相關方法
_wp_customize_loader_settingsis_customize_preview_customizer_mobile_viewport_metaget_custom_header_markuppost_custom_meta_boxsanitize_title_for_query
引入
4.5.0
棄用
-

customize_render_partials_before 是WordPress中的一個動作,在Customizer開始渲染部分內容之前啟動。這個動作可以用來在部分內容被渲染之前新增自定義邏輯或額外的內容。

在引數被渲染之前立即觸發。

外掛可以做一些事情,比如呼叫wp_enqueue_scripts()並收集一個可能在響應中被排隊的指令碼和樣式的列表。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'customize_render_partials_before', $this, $partials );
do_action( 'customize_render_partials_before', $this, $partials );
do_action( 'customize_render_partials_before', $this, $partials );

常見問題

FAQs
檢視更多 >