_cleanup_header_comment

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

Description

(string) _cleanup_header_comment( (string) $str ); 

Returns (string)

Parameters (1)

0. $str (string)
Header comment to clean up.

Usage

  1. if ( !function_exists( '_cleanup_header_comment' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4. // Header comment to clean up. 
  5. $str = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _cleanup_header_comment($str); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function _cleanup_header_comment( $str ) { 
  2. return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str));