_cleanup_image_add_caption

函式
_cleanup_image_add_caption ( $matches )

cleanup_image_add_caption: 這個函式用來為文章中的圖片自動新增標題。它接受一個文章內容字串作為其引數,並返回更新的內容,並在圖片上新增標題。

在image_add_caption()中使用的私密preg_replace回撥。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _cleanup_image_add_caption( $matches ) {
// Remove any line breaks from inside the tags.
return preg_replace( '/[rnt]+/', ' ', $matches[0] );
}
function _cleanup_image_add_caption( $matches ) { // Remove any line breaks from inside the tags. return preg_replace( '/[rnt]+/', ' ', $matches[0] ); }
function _cleanup_image_add_caption( $matches ) {
	// Remove any line breaks from inside the tags.
	return preg_replace( '/[rnt]+/', ' ', $matches[0] );
}

常見問題

FAQs
檢視更多 >