WordPress开发者和主题制作者的搜索引擎



_cleanup_header_comment ›

Since2.8.0
已弃用n/a
_cleanup_header_comment ( $str )
访问:
  • private
参数:
  • (string) $str Header comment to clean up.
    Required: Yes
查看:
返回:
  • (string)
定义在:
文档:

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



源码

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