_cleanup_header_comment

函数


_cleanup_header_comment ( $str )
Access
Private
参数
  • (string)
    $str
    Header comment to clean up.
    Required:
返回值
  • (string)
相关
  • https://core.trac.wordpress.org/ticket/8497
定义位置
  • wp-includes/functions.php
    , line 6548
引入
2.8.0
弃用

剥离WP使用的文件头中的close comment和close php标签。

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