WP_CLI
UpgraderSkin::process_feedback()
Process the feedback collected through the compat indirection.
Method of the class: UpgraderSkin{}
No Hooks.
Return
null
. Nothing (null).
Usage
$UpgraderSkin = new UpgraderSkin(); $UpgraderSkin->process_feedback( $string, $args );
- $string(string) (required)
- String to use as feedback message.
- $args(array) (required)
- Array of additional arguments to process.
UpgraderSkin::process_feedback() UpgraderSkin::process feedback code 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 ); }