PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 1.9.6
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v1.9.6
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
searchpro / api / register_apis.php

register_apis.php in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript 1.9.6, at api/register_apis.php

87 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit;
3
4 add_action('rest_api_init', function () {
5
6 register_rest_route(
7 'optifer/v1',
8 '/media-ids',
9 array(
10 'methods' => 'POST',
11 'callback' => [$this, 'get_media_ids'],
12 'permission_callback' => 'berq_rest_permission_callback',
13 )
14 );
15
16 register_rest_route(
17 'optifer/v1',
18 '/optimize-images',
19 array(
20 'methods' => 'POST',
21 'callback' => [$this, 'optimize_images'],
22 'permission_callback' => 'berq_rest_permission_callback',
23 )
24 );
25
26 register_rest_route(
27 'optifer/v1',
28 '/delete-images',
29 array(
30 'methods' => 'POST',
31 'callback' => [$this, 'delete_images'],
32 'permission_callback' => 'berq_rest_permission_callback',
33 )
34 );
35
36 register_rest_route(
37 'optifer/v1',
38 '/clear-cache',
39 array(
40 'methods' => 'POST',
41 'callback' => [$this, 'clear_cache'],
42 'permission_callback' => 'berq_rest_permission_callback',
43 )
44 );
45
46 // Not being used
47 // register_rest_route(
48 // 'optifer/v1',
49 // '/warmup-cache',
50 // array(
51 // 'methods' => 'POST',
52 // 'callback' => [$this, 'warmup_cache'],
53 // 'permission_callback' => '__return_true',
54 // )
55 // );
56
57 register_rest_route(
58 'optifer/v1',
59 '/store-webp',
60 array(
61 'methods' => 'POST',
62 'callback' => [$this, 'store_webp'],
63 'permission_callback' => 'berq_rest_verify_license_callback',
64 )
65 );
66
67 register_rest_route(
68 'optifer/v1',
69 '/store-cache',
70 array(
71 'methods' => 'POST',
72 'callback' => [$this, 'store_cache'],
73 'permission_callback' => 'berq_rest_verify_license_callback',
74 )
75 );
76
77 register_rest_route(
78 'optifer/v1',
79 '/store-javascript-cache',
80 array(
81 'methods' => 'POST',
82 'callback' => [$this, 'store_javascript_cache'],
83 'permission_callback' => 'berq_rest_verify_license_callback',
84 )
85 );
86
87 });