mirror of
https://ghproxy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-07-21 12:16:59 +08:00
* add: reviews module * add: logic for the days * Update modules/reviews/assets/src/layouts/user-feedback-form.js Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * fix: button name and action * add: feedback url * fix: endpoint for feedback * remove: unused imports * add: app_name * update: move app name to the request --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com>
39 lines
780 B
PHP
39 lines
780 B
PHP
<?php
|
|
|
|
namespace EA11y\Modules\Reviews\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 'reviews/' . $this->get_path();
|
|
}
|
|
|
|
public function get_path(): string {
|
|
return $this->path;
|
|
}
|
|
|
|
public function get_name(): string {
|
|
return 'reviews';
|
|
}
|
|
|
|
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' );
|
|
}
|
|
}
|