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.

PO::comment_block() WordPress Method

The PO::comment_block() method is used to create a comment block in a PO file. A comment block is a block of text that is not used by the gettext system, but is useful for providing information about the file, such as the author, copyright, or license.

PO::comment_block( string $text, string $char = ' ' ) #

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


Parameters

$text

(string)(Required)the comment text

$char

(string)(Optional)character to denote a special PO comment, like :, default is a space

Default value: ' '


Top ↑

Source

File: wp-includes/pomo/po.php

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.