Title: Automatic_Upgrader_Skin::feedback
Published: April 25, 2014
Last modified: May 20, 2026

---

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

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#wp--skip-link--target)

Stores a message about the upgrade.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#parameters)󠁿

 `$feedback`string|array|[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
required

Message data.

`$args`mixedoptional

Optional text replacements.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#source)󠁿

    ```php
    public function feedback( $feedback, ...$args ) {
    	if ( is_wp_error( $feedback ) ) {
    		$string = $feedback->get_error_message();
    	} elseif ( is_array( $feedback ) ) {
    		return;
    	} else {
    		$string = $feedback;
    	}

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

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

    	$string = trim( $string );

    	// Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
    	$string = wp_kses(
    		$string,
    		array(
    			'a'      => array(
    				'href' => true,
    			),
    			'br'     => true,
    			'em'     => true,
    			'strong' => true,
    		)
    	);

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

    	$this->messages[] = $string;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-automatic-upgrader-skin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-automatic-upgrader-skin.php#L74)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-automatic-upgrader-skin.php#L74-L113)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_kses()](https://developer.wordpress.org/reference/functions/wp_kses/)`wp-includes/kses.php` |

Filters text content and strips out disallowed HTML.

  | 
| [is_wp_error()](https://developer.wordpress.org/reference/functions/is_wp_error/)`wp-includes/load.php` |

Checks whether the given variable is a WordPress Error.

  |

| Used by | Description | 
| [WP_Ajax_Upgrader_Skin::feedback()](https://developer.wordpress.org/reference/classes/wp_ajax_upgrader_skin/feedback/)`wp-admin/includes/class-wp-ajax-upgrader-skin.php` |

Stores a message about the upgrade.

  | 
| [Automatic_Upgrader_Skin::footer()](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/footer/)`wp-admin/includes/class-automatic-upgrader-skin.php` |

Retrieves the buffered content, deletes the buffer, and processes the output.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/automatic_upgrader_skin/feedback/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.0/) | Renamed `$data` to `$feedback` for PHP 8 named parameter support. | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fautomatic_upgrader_skin%2Ffeedback%2F)
before being able to contribute a note or feedback.