WP_CLI

UpgraderSkin::process_feedback()publicWP-CLI 1.0

Process the feedback collected through the compat indirection.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$UpgraderSkin = new UpgraderSkin();
$UpgraderSkin->process_feedback( $string, $args );
$string(строка) (обязательный)
String to use as feedback message.
$args(массив) (обязательный)
Array of additional arguments to process.

Код UpgraderSkin::process_feedback() WP-CLI 2.8.0-alpha

public function process_feedback( $string, $args ) {

	if ( 'parent_theme_prepare_install' === $string ) {
		WP_CLI::get_http_cache_manager()->whitelist_package( $this->api->download_link, 'theme', $this->api->slug, $this->api->version );
	}

	if ( isset( $this->upgrader->strings[ $string ] ) ) {
		$string = $this->upgrader->strings[ $string ];
	}

	if ( ! empty( $args ) && strpos( $string, '%' ) !== false ) {
		$string = vsprintf( $string, $args );
	}

	if ( empty( $string ) ) {
		return;
	}

	$string = str_replace( '…', '...', Utils\strip_tags( $string ) );
	$string = html_entity_decode( $string, ENT_QUOTES, get_bloginfo( 'charset' ) );

	WP_CLI::log( $string );
}