PluginProbe
Borderless – Addons and Templates for Elementor / 1.6.1
Borderless – Addons and Templates for Elementor v1.6.1
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 All 78 releases
borderless / includes / library / inc / PluginInstallerSkin.php

PluginInstallerSkin.php in Borderless – Addons and Templates for Elementor 1.6.1, at includes/library/inc/PluginInstallerSkin.php

33 lines 816 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace LIBRARY;
4
5 if ( ! class_exists( '\Plugin_Upgrader', false ) ) {
6 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
7 }
8
9 class PluginInstallerSkin extends \WP_Upgrader_Skin {
10
11 public function header() {}
12 public function footer() {}
13 public function feedback( $string, ...$args ) {}
14 public function decrement_update_count( $type ) {}
15
16 public function error( $errors ) {
17 if ( empty( $errors ) ) {
18 return;
19 }
20
21 if ( is_string( $errors ) ) {
22 wp_send_json_error( $errors );
23 } elseif ( is_wp_error( $errors ) && $errors->has_errors() ) {
24 if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) ) {
25 wp_send_json_error( $message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
26 } else {
27 wp_send_json_error( $message );
28 }
29 }
30 }
31 }
32
33