PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.0
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.0
1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / src / Api / Routes / Routes.php
hostinger-reach / src / Api / Routes Last commit date
FormsRoutes.php 8 months ago HostingRoutes.php 3 months ago IntegrationsRoutes.php 1 week ago ReachRoutes.php 1 month ago Routes.php 5 months ago
Routes.php
36 lines
1 <?php
2
3 namespace Hostinger\Reach\Api\Routes;
4
5 use Hostinger\Reach\Api\ApiKeyManager;
6 use Hostinger\Reach\Api\Handlers\ApiHandler;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 die;
10 }
11
12 class Routes {
13 private ApiHandler $handler;
14 private ApiKeyManager $api_key_manager;
15
16 public function __construct( ApiHandler $handler, ApiKeyManager $api_key_manager ) {
17 $this->handler = $handler;
18 $this->api_key_manager = $api_key_manager;
19 }
20
21 public function init(): void {
22 add_action( 'rest_api_init', array( $this, 'register_routes' ) );
23 }
24
25 public function permission_check(): bool {
26 if ( has_action( 'litespeed_control_set_nocache' ) ) {
27 do_action(
28 'litespeed_control_set_nocache',
29 'Custom Rest API endpoint, not cacheable.'
30 );
31 }
32
33 return current_user_can( 'manage_options' );
34 }
35 }
36