Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use https://core.trac.wordpress.org/ticket/8497 instead.

_cleanup_header_comment( string $str ): string

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


Description

Top ↑

See also


Top ↑

Parameters

$str string Required
Header comment to clean up.

Top ↑

Return

string


Top ↑

Source

File: wp-includes/functions.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
2.8.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.