WP_Ajax_Upgrader_Skin::feedback() WordPress Method

The WP_Ajax_Upgrader_Skin::feedback() method is used to give feedback to the user during an AJAX upgrade process.

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

Stores a message about the upgrade.


Parameters

$feedback

(string|array|WP_Error)(Required)Message data.

$args

(mixed)(Optional)text replacements.


Top ↑

Source

File: wp-admin/includes/class-wp-ajax-upgrader-skin.php

	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 );
	}


Top ↑

Changelog

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.

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.