| 1 |
<?php |
| 2 |
/** |
| 3 |
* Represents a skin for WordPress plugin upgrade. |
| 4 |
* |
| 5 |
* @package WP_Defender\Behavior\Scan_Item |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace WP_Defender\Behavior\Scan_Item; |
| 9 |
|
| 10 |
use WP_Ajax_Upgrader_Skin; |
| 11 |
|
| 12 |
/** |
| 13 |
* Include the WP_Upgrader class if it's not already loaded. |
| 14 |
*/ |
| 15 |
if ( ! class_exists( \WP_Upgrader::class ) ) { |
| 16 |
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; |
| 17 |
} |
| 18 |
/** |
| 19 |
* Include the Theme_Upgrader class if it's not already loaded. |
| 20 |
*/ |
| 21 |
if ( ! class_exists( \Theme_Upgrader::class ) ) { |
| 22 |
require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader.php'; |
| 23 |
} |
| 24 |
/** |
| 25 |
* Represents a skin for WordPress plugin upgrade. |
| 26 |
*/ |
| 27 |
class Plugin_Skin extends WP_Ajax_Upgrader_Skin { |
| 28 |
/** |
| 29 |
* Handles feedback for the plugin upgrade process. |
| 30 |
* |
| 31 |
* @param mixed $data The data received from the plugin upgrade process. |
| 32 |
* @param mixed ...$args Additional arguments passed to the method. |
| 33 |
* |
| 34 |
* @return string Empty string always returned. |
| 35 |
*/ |
| 36 |
public function feedback( $data, ...$args ) { |
| 37 |
return ''; |
| 38 |
} |
| 39 |
} |
| 40 |
|