_filter_do_shortcode_context

函式
_filter_do_shortcode_context ( No parameters )
Access
Private
返回值
  • (string) The filtered context value for wp_get_attachment_images when doing shortcodes.
定義位置
相關方法
filter_block_contentdo_shortcode_tagget_shortcode_tags_in_contentwp_video_shortcoderest_filter_response_by_context
引入
6.3.0
棄用
-

在簡碼渲染期間過濾 “wp_get_attachment_image_context “鉤子。

在簡碼渲染過程中呼叫 wp_get_attachment_image() 時,我們需要明確上下文是簡碼而不是主題模板渲染邏輯的一部分。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _filter_do_shortcode_context() {
return 'do_shortcode';
}
function _filter_do_shortcode_context() { return 'do_shortcode'; }
function _filter_do_shortcode_context() {
	return 'do_shortcode';
}

常見問題

FAQs
檢視更多 >