: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (!defined('ABSPATH')) exit;
if (!class_exists('BVUpgraderSkin')) :
class BVUpgraderSkin extends WP_Upgrader_Skin {
public $status = array();
public $plugin_info = array();
public $theme_info = array();
public $plugins_by_name = array();
public $language_update = null;
const UPGRADER_WING_VERSION = 1.1;
function __construct($type, $plugins_by_name = array(), $package = '') {
$this->package = $package;
$this->plugins_by_name = $plugins_by_name;
parent::__construct(array());
if (!empty($this->theme_info))
$key = $this->theme_info['Name'];
if (!empty($this->plugin_info)) {
$key = $this->plugin_info['Name'];
$key_by_file = $this->plugins_by_name[$key];
if (!empty($this->package))
case "upgrade_translations":
if (null != $this->language_update)
$key = $this->language_update->package;
return array($key, $key_by_file);
function error($errors) {
list($key, $key_by_file) = $this->get_keys();
$message['error'] = true;
if (is_string($errors)) {
$message['message'] = $errors;
} elseif (is_wp_error($errors) && $errors->get_error_code()) {
$message['data'] = $errors->get_error_data();
$message['code'] = $errors->get_error_code();
$this->status[$this->action.':'.$key][] = $message;
if (!empty($key_by_file)) {
$this->status[$this->action.':'.$key_by_file][] = $message;
function feedback($string, ...$args) {
if ( strpos( $string, '%' ) !== false ) {
$args = array_map( 'strip_tags', $args );
$args = array_map( 'esc_html', $args );
$string = vsprintf( $string, $args );
list($key, $key_by_file) = $this->get_keys();
$message['message'] = $string;
if (!empty($key_by_file)) {
$this->status[$this->action.':'.$key_by_file][] = $message;
$this->status[$this->action.':'.$key][] = $message;