wp_html_split

函式
wp_html_split ( $input )
引數
  • (string) $input The text which has to be formatted.
    Required:
返回值
  • (string[]) Array of the formatted text.
定義位置
相關方法
wp_html_excerptwp_kses_splitwp_get_split_termget_html_split_regexwp_get_split_terms
引入
4.2.4
棄用
-

wp_html_split: 這個函式用於將一個HTML字串分割成一個標記陣列。它需要兩個引數,第一個是HTML字串,第二個是要分割字串的標籤列表: 該函式返回一個標記陣列,每個標記是一個HTML標記或一段文字。

將HTML元素和註釋與文字分開。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_html_split( $input ) {
return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );
}
function wp_html_split( $input ) { return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE ); }
function wp_html_split( $input ) {
	return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );
}

常見問題

FAQs
檢視更多 >