PluginProbe
Tagembed: Social Media Feeds and Customer Reviews Widget / 8.0
Tagembed: Social Media Feeds and Customer Reviews Widget v8.0
7.9 8.0 7.8 7.5 7.6 7.7 7.4 trunk 3.10 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 All 45 releases
← All changes | tagembed.php +70 -2 7.8 → 8.0 View file →
@@ -3,9 +3,9 @@
3 3 /**
4 4 * Plugin Name: Tagembed: Social Media Feeds and Customer Reviews Widget
5 5 * Plugin URI: https://tagembed.com/
6 6 * Description: Display social media feeds and user-generated content in an interactive widget.
7 - * Version: 7.8
7 + * Version: 8.0
8 8 * Author: Tagembed
9 9 * Author URI: https://tagembed.com/
10 10 * License: GPLv3
11 11 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -15,9 +15,9 @@
15 15 die;
16 16 endif;
17 17
18 18 /* --Start-- Create Constant */
19 -!defined('TAGEMBED_PLUGIN_VERSION') && define('TAGEMBED_PLUGIN_VERSION', '7.8');
19 +!defined('TAGEMBED_PLUGIN_VERSION') && define('TAGEMBED_PLUGIN_VERSION', '8.0');
20 20 !defined('TAGEMBED_PLUGIN_DIR_PATH') && define('TAGEMBED_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
21 21 !defined('TAGEMBED_PLUGIN_URL') && define('TAGEMBED_PLUGIN_URL', plugin_dir_url(__FILE__));
22 22 !defined('TAGEMBED_PLUGIN_REDIRECT_URL') && define('TAGEMBED_PLUGIN_REDIRECT_URL', get_admin_url(null, 'admin.php?page='));
23 23
@@ -254,8 +254,64 @@
254 254 unset($param);
255 255 $response = ___tagembed__manageApiResponse($response);
256 256 return ___tagembed__exitWithSuccess($response);
257 257 break;
258 + case '__tagembed__get_cards':
259 + if (empty($__tagembed__user_details)) :
260 + return ___tagembed__exitWithDanger();
261 + endif;
262 + $param['userId'] = sanitize_key($__tagembed__user_details->userId);
263 + $param['platform'] = TAGEMBED_PLUGIN_PLATFORM;
264 + $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/getcards', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
265 + unset($param);
266 + $response = ___tagembed__manageApiResponse($response);
267 + return ___tagembed__exitWithSuccess($response);
268 + break;
269 + case '__tagembed__card_session':
270 + if (empty($__tagembed__user_details)) :
271 + return ___tagembed__exitWithDanger();
272 + endif;
273 + $param['userId'] = sanitize_key($__tagembed__user_details->userId);
274 + $param['platform'] = TAGEMBED_PLUGIN_PLATFORM;
275 + $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/cardsession', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
276 + unset($param);
277 + $response = ___tagembed__manageApiResponse($response);
278 + return ___tagembed__exitWithSuccess($response);
279 + break;
280 + case '__tagembed__get_plan_status':
281 + if (empty($__tagembed__user_details)) :
282 + return ___tagembed__exitWithDanger();
283 + endif;
284 + $param['userId'] = sanitize_key($__tagembed__user_details->userId);
285 + $param['platform'] = TAGEMBED_PLUGIN_PLATFORM;
286 + $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/planstatus', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
287 + unset($param);
288 + $response = ___tagembed__manageApiResponse($response);
289 + return ___tagembed__exitWithSuccess($response);
290 + break;
291 + case '__tagembed__get_invoice_pdf':
292 + if (empty($__tagembed__user_details) || empty($data->invoiceId)) :
293 + return ___tagembed__exitWithDanger();
294 + endif;
295 + $param['userId'] = sanitize_key($__tagembed__user_details->userId);
296 + $param['invoiceId'] = sanitize_text_field($data->invoiceId);
297 + $param['platform'] = TAGEMBED_PLUGIN_PLATFORM;
298 + $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/invoicepdf', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
299 + unset($param);
300 + $response = ___tagembed__manageApiResponse($response);
301 + return ___tagembed__exitWithSuccess($response);
302 + break;
303 + case '__tagembed__get_invoices':
304 + if (empty($__tagembed__user_details)) :
305 + return ___tagembed__exitWithDanger();
306 + endif;
307 + $param['userId'] = sanitize_key($__tagembed__user_details->userId);
308 + $param['platform'] = TAGEMBED_PLUGIN_PLATFORM;
309 + $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/getinvoices', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
310 + unset($param);
311 + $response = ___tagembed__manageApiResponse($response);
312 + return ___tagembed__exitWithSuccess($response);
313 + break;
258 314 case '__tagembed__get_account_details':
259 315 $data->auth = !empty($data->auth) ? 1 : 0;
260 316 if (empty($__tagembed__user_details)) :
261 317 return ___tagembed__exitWithDanger();
@@ -958,8 +1014,20 @@
958 1014 $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/getpaymentdetails', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
959 1015 unset($param);
960 1016 $response = ___tagembed__manageApiResponse($response);
961 1017 return ___tagembed__exitWithSuccess(['__tagembed__requestCallBackUrl' => TAGEMBED_PLUGIN_CALL_BACK_URL, 'redirectUrl' => TAGEMBED_PLUGIN_API_URL . 'apiaccount/makepayment', '__tagembed__paymentData' => $response->__tagembed__paymentData]);
1018 + break;
1019 + case '__tagembed__resume_subscription':
1020 + if (empty($__tagembed__user_details)) :
1021 + return ___tagembed__exitWithDanger();
1022 + endif;
1023 + $param['userId'] = sanitize_key($__tagembed__user_details->userId);
1024 + $param['platform'] = TAGEMBED_PLUGIN_PLATFORM;
1025 + $response = ___tagembed__wpApiCall(TAGEMBED_PLUGIN_API_URL . 'apiaccount/resumesubscription', $param, ['Authorization:' . $__tagembed__user_details->accessToken]);
1026 + unset($param);
1027 + $response = ___tagembed__manageApiResponse($response);
1028 + $response = !empty($response->message) ? $response->message : 'Done';
1029 + return ___tagembed__exitWithSuccess(['message' => $response]);
962 1030 break;
963 1031 case '__tagembed__cancel_subscription':
964 1032 if (empty($__tagembed__user_details) || empty($data->planId)) :
965 1033 return ___tagembed__exitWithDanger();