Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General: bring in changes introduced in WordPress 5.3 #13695

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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