WP_Ajax_Upgrader_Skin::feedback( string|array|WP_Error $feedback, mixed $args )

In this article

Stores a message about the upgrade.

Parameters

$feedbackstring|array|WP_Errorrequired
Message data.
$argsmixedoptional
Optional text replacements.

Source

public function feedback( $feedback, ...$args ) {
	if ( is_wp_error( $feedback ) ) {
		foreach ( $feedback->get_error_codes() as $error_code ) {
			$this->errors->add( $error_code, $feedback->get_error_message( $error_code ), $feedback->get_error_data( $error_code ) );
		}
	}

	parent::feedback( $feedback, ...$args );
}

Changelog

VersionDescription
5.9.0Renamed $data to $feedback for PHP 8 named parameter support.
5.3.0Formalized the existing ...$args parameter by adding it to the function signature.
4.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.