Skip to content

Commit

Permalink
General: bring in changes introduced in WordPress 5.3 (#13695)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve authored Oct 11, 2019
1 parent cc90c84 commit 260f8d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _inc/lib/class.jetpack-automatic-install-skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ public function get_main_error_message() {

/**
* Overwrites the feedback function
*
* @param string|array|WP_Error $data Data.
* @param mixed ...$args Optional text replacements.
*/
public function feedback( $data ) {
public function feedback( $data, ...$args ) {

$current_error = null;
if ( is_wp_error( $data ) ) {
Expand All @@ -86,9 +89,6 @@ public function feedback( $data ) {
}

if ( strpos( $string, '%' ) !== false ) {
// phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
$args = func_get_args();
$args = array_splice( $args, 1 );
if ( ! empty( $args ) ) {
$string = vsprintf( $string, $args );
}
Expand Down

0 comments on commit 260f8d4

Please sign in to comment.