wpseek.com
A WordPress-centric search engine for devs and theme authors



_cleanup_image_add_caption › WordPress Function

Since3.4.0
Deprecatedn/a
_cleanup_image_add_caption ( $matches )
Access:
  • private
Parameters:
  • (array) $matches Single regex match.
    Required: Yes
Returns:
  • (string) Cleaned up HTML for caption.
Defined at:
Codex:

Private preg_replace callback used in image_add_caption().



Source

function _cleanup_image_add_caption( $matches ) {
	// Remove any line breaks from inside the tags.
	return preg_replace( '/[\r\n\t]+/', ' ', $matches[0] );
}