one-click-accessibility/modules/remediation/classes/route-base.php
VasylD 55b91a18b5
[APP-1401] clear cache on update (#302)
* [APP-1401] clear cache on update

* [APP-1401] clear cache on update

* [APP-1401] clear cache on update

* [APP-1401] clear cache on update
2025-06-24 18:51:41 +02:00

39 lines
782 B
PHP

<?php
namespace EA11y\Modules\Remediation\Classes;
use EA11y\Classes\Rest\Route;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Class Route_Base
*/
class Route_Base extends Route {
protected bool $override = false;
protected $auth = true;
protected string $path = '';
public function get_methods(): array {
return [];
}
public function get_endpoint(): string {
return 'remediation/' . $this->get_path();
}
public function get_path(): string {
return $this->path;
}
public function get_name(): string {
return '';
}
public function get_permission_callback( \WP_REST_Request $request ) : bool {
$valid = $this->permission_callback( $request );
return $valid && user_can( $this->current_user_id, 'manage_options' );
}
}