PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | back/Controllers/Plugins/Available.php +6 -1 10.11.1 → 11.1.0 View file →
@@ -16,8 +16,10 @@
16 16 $data['types'] = $this->types;
17 17 $data['level'] = $this->level;
18 18 $data['workflowHelper'] = new WorkflowHelper();
19 19
20 + acym_addScript(true, 'window.acymailingAvailableAddons = '.json_encode(ACYM_AVAILABLE_PLUGINS).';');
21 +
20 22 parent::display($data);
21 23 }
22 24
23 25 public function download(bool $ajax = true, string $pluginFromUpdate = ''): string
@@ -24,8 +26,9 @@
24 26 {
25 27 $plugin = [];
26 28
27 29 if (empty($pluginFromUpdate)) {
30 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
28 31 $this->isLatestAcyMailingVersion();
29 32 $plugin = acym_getVar('array', 'plugin');
30 33 } else {
31 34 $plugins = acym_fileGetContent(ACYM_UPDATEME_API_URL.'public/addons');
@@ -51,8 +54,9 @@
51 54 if (!empty($errorMessage)) {
52 55 return $errorMessage;
53 56 }
54 57
58 + // We update the plugin info in DB
55 59 $pluginToSave = new \stdClass();
56 60 $pluginToSave->title = $plugin['name'];
57 61 $pluginToSave->folder_name = $plugin['file_name'];
58 62 $pluginToSave->version = $plugin['version'];
@@ -76,12 +80,13 @@
76 80 }
77 81
78 82 public function getAllPluginsAjax(): void
79 83 {
84 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
80 85 acym_sendAjaxResponse('', $this->getAllPlugins());
81 86 }
82 87
83 - public function getAllPlugins(): array
88 + private function getAllPlugins(): array
84 89 {
85 90 $pluginClass = new PluginClass();
86 91 $plugins = $pluginClass->getMatchingElements(['ordering' => 'title']);
87 92