WP_CLI

DocParser::get_longdesc()publicWP-CLI 1.0

Get the command's full description

Метод класса: DocParser{}

Хуков нет.

Возвращает

Строку.

Использование

$DocParser = new DocParser();
$DocParser->get_longdesc();

Код DocParser::get_longdesc() WP-CLI 2.8.0-alpha

public function get_longdesc() {
	$shortdesc = $this->get_shortdesc();
	if ( ! $shortdesc ) {
		return '';
	}

	$longdesc = substr( $this->doc_comment, strlen( $shortdesc ) );

	$lines = [];
	foreach ( explode( "\n", $longdesc ) as $line ) {
		if ( 0 === strpos( $line, '@' ) ) {
			break;
		}

		$lines[] = $line;
	}

	return trim( implode( "\n", $lines ) );
}