PO::comment_block()public staticWP 1.0

Prepare a text as a comment -- wraps the lines and prepends # and a special character to each line

Method of the class: PO{}

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

null. Nothing (null).

Usage

$result = PO::comment_block( $text, $char );
$text(string) (required)
the comment text
$char(string)
character to denote a special PO comment, like :, default is a space
Default: ' '

PO::comment_block() code WP 6.5.2

public static function comment_block( $text, $char = ' ' ) {
	$text = wordwrap( $text, PO_MAX_LINE_LEN - 3 );
	return PO::prepend_each_line( $text, "#$char " );
}