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/dynamics/subscription/SubscriptionAutomationActions.php +19 -17 11.0.2 → 11.1.0 View file →
@@ -4,10 +4,19 @@
4 4 use AcyMailing\Classes\ListClass;
5 5
6 6 trait SubscriptionAutomationActions
7 7 {
8 - public function onAcymDeclareActions(array &$actions): void
8 + protected function initAutomationActions(): void
9 9 {
10 + $this->automationActions = [
11 + 'acy_list' => acym_translation('ACYM_ACYMAILING_LIST'),
12 + 'subscribe_followup' => acym_translation('ACYM_SUBSCRIBE_FOLLOW_UP'),
13 + 'unsubscribe_followup' => acym_translation('ACYM_UNSUBSCRIBE_FOLLOW_UP'),
14 + ];
15 + }
16 +
17 + public function displayActionOptions_acy_list(): void
18 + {
10 19 $listClass = new ListClass();
11 20
12 21 $listActions = [
13 22 'sub' => acym_translation('ACYM_SUBSCRIBE_USERS_TO'),
@@ -15,32 +24,25 @@
15 24 'unsub' => acym_translation('ACYM_UNSUBSCRIBE_USERS_TO'),
16 25 ];
17 26 $lists = $listClass->getAllForSelect();
18 27
19 - $actions['acy_list'] = new stdClass();
20 - $actions['acy_list']->name = acym_translation('ACYM_ACYMAILING_LIST');
21 - ob_start();
22 28 include acym_getPartial('actions', 'acy_list');
23 - $actions['acy_list']->option = ob_get_clean();
29 + }
24 30
31 + public function displayActionOptions_subscribe_followup(): void
32 + {
25 33 $followupClass = new FollowupClass();
26 34 $allListFollowups = $followupClass->getAll();
27 - $actions['subscribe_followup'] = new stdClass();
28 - $actions['subscribe_followup']->name = acym_translation('ACYM_SUBSCRIBE_FOLLOW_UP');
29 - ob_start();
35 +
30 36 include acym_getPartial('actions', 'subscribe_followup');
31 - $actions['subscribe_followup']->option = ob_get_clean();
32 -
33 - $actions['unsubscribe_followup'] = new stdClass();
34 - $actions['unsubscribe_followup']->name = acym_translation('ACYM_UNSUBSCRIBE_FOLLOW_UP');
35 - ob_start();
36 - include acym_getPartial('actions', 'unsubscribe_followup');
37 - $actions['unsubscribe_followup']->option = ob_get_clean();
38 37 }
39 38
40 - public function onAcymDeclareActionsScenario(array &$actions): void
39 + public function displayActionOptions_unsubscribe_followup(): void
41 40 {
42 - $this->onAcymDeclareActions($actions);
41 + $followupClass = new FollowupClass();
42 + $allListFollowups = $followupClass->getAll();
43 +
44 + include acym_getPartial('actions', 'unsubscribe_followup');
43 45 }
44 46
45 47 public function onAcymProcessAction_acy_list(&$query, $action)
46 48 {