_filter_block_content_callback

函式
_filter_block_content_callback ( $matches )
引數
  • (array) $matches Array of preg_replace_callback matches.
    Required:
返回值
  • (string) Replacement string.
定義位置
相關方法
filter_block_contentregister_block_core_calendarregister_block_core_social_linkwp_filter_content_tags_filter_block_template_part_area
引入
6.2.1
棄用
-

用於在 filter_block_content() 中替換正規表示式的回撥。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _filter_block_content_callback( $matches ) {
return '<!--' . rtrim( $matches[1], '-' ) . '-->';
}
function _filter_block_content_callback( $matches ) { return '<!--' . rtrim( $matches[1], '-' ) . '-->'; }
function _filter_block_content_callback( $matches ) {
	return '<!--' . rtrim( $matches[1], '-' ) . '-->';
}

常見問題

FAQs
檢視更多 >