Bulk_Upgrader_Skin::feedback()
Displays a message about the update.
Method of the class: Bulk_Upgrader_Skin{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Bulk_Upgrader_Skin = new Bulk_Upgrader_Skin(); $Bulk_Upgrader_Skin->feedback( $feedback, ...$args );
- $feedback(string) (required)
- Message data.
- ...$args(mixed) (required)
- Optional text replacements.
Changelog
Since 3.0.0 | Introduced. |
Since 5.9.0 | Renamed $string (a PHP reserved keyword) to $feedback for PHP 8 named parameter support. |
Bulk_Upgrader_Skin::feedback() Bulk Upgrader Skin::feedback code WP 6.6.2
public function feedback( $feedback, ...$args ) { if ( isset( $this->upgrader->strings[ $feedback ] ) ) { $feedback = $this->upgrader->strings[ $feedback ]; } if ( str_contains( $feedback, '%' ) ) { if ( $args ) { $args = array_map( 'strip_tags', $args ); $args = array_map( 'esc_html', $args ); $feedback = vsprintf( $feedback, $args ); } } if ( empty( $feedback ) ) { return; } if ( $this->in_loop ) { echo "$feedback<br />\n"; } else { echo "<p>$feedback</p>\n"; } }