PluginProbe
E2Pdf – Export Pdf Tool for WordPress / 1.32.53
E2Pdf – Export Pdf Tool for WordPress v1.32.53
1.32.53 1.32.51 1.32.49 1.32.48 1.32.43 1.32.40 1.32.34 1.32.32 1.32.31 1.32.26 1.32.22 1.32.23 1.32.18 1.32.17 1.32.15 trunk 1.00.00 1.00.13 1.01.01 1.02.02 1.03.07 1.04.07 1.05.03 1.06.02 1.07.11 All 74 releases
← All changes | classes/controller/frontend/e2pdf-rpc-v1.php +23 -3 1.32.18 → 1.32.53 View file →
@@ -13,9 +13,9 @@
13 13
14 14 class Controller_Frontend_E2pdf_Rpc_V1 extends Helper_E2pdf_View {
15 15
16 16 // zapier rpc service
17 - public function zapier($rpc) {
17 + public function zapier_action($rpc) {
18 18 if (is_a($rpc, 'Model_E2pdf_Rpc')) {
19 19 switch ($rpc->get('action')) {
20 20 case 'auth':
21 21 if ($rpc->get_arg('api_key') == get_option('e2pdf_zapier_api_key')) {
@@ -30,9 +30,9 @@
30 30 }
31 31 }
32 32
33 33 // adobe rpc service
34 - public function adobe($rpc) {
34 + public function adobe_action($rpc) {
35 35 if (is_a($rpc, 'Model_E2pdf_Rpc')) {
36 36 switch ($rpc->get('action')) {
37 37 case 'auth':
38 38 if ($rpc->get_arg('api_key') == get_option('e2pdf_adobe_api_key')) {
@@ -56,9 +56,9 @@
56 56 }
57 57 }
58 58
59 59 // gdrive rpc service
60 - public function gdrive($rpc) {
60 + public function gdrive_action($rpc) {
61 61 if (is_a($rpc, 'Model_E2pdf_Rpc')) {
62 62 switch ($rpc->get('action')) {
63 63 case 'auth':
64 64 if ($rpc->get_arg('api_key') == get_option('e2pdf_gdrive_api_key')) {
@@ -74,8 +74,28 @@
74 74 ]
75 75 )
76 76 );
77 77 }
78 + } else {
79 + wp_send_json_error(null, 401);
80 + }
81 + break;
82 + default:
83 + break;
84 + }
85 + }
86 + }
87 +
88 + public function restore_action($rpc) {
89 + if (is_a($rpc, 'Model_E2pdf_Rpc')) {
90 + switch ($rpc->get('action')) {
91 + case 'request':
92 + if (get_transient('e2pdf_restore_key') && $rpc->get_arg('restore_key') === get_transient('e2pdf_restore_key')) {
93 + wp_send_json_success(
94 + [
95 + 'restore_key' => get_transient('e2pdf_restore_key'),
96 + ]
97 + );
78 98 } else {
79 99 wp_send_json_error(null, 401);
80 100 }
81 101 break;