A WordPress-centric search engine for devs and theme authors



_cleanup_header_comment ›

Since2.8.0
Deprecatedn/a
_cleanup_header_comment ( $str )
Access:
  • private
Parameters:
  • (string) $str Header comment to clean up.
    Required: Yes
See:
Returns:
  • (string)
Defined at:
Codex:

Strip close comment and close php tags from file headers used by WP.



Source

function _cleanup_header_comment( $str ) {
	return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str));
}