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/Types/AclType.php +12 -4 10.0.1 → 11.1.0 View file →
@@ -5,9 +5,9 @@
5 5 use AcyMailing\Core\AcymObject;
6 6
7 7 class AclType extends AcymObject
8 8 {
9 - private $groups;
9 + private array $groups;
10 10
11 11 public function __construct()
12 12 {
13 13 parent::__construct();
@@ -25,13 +25,21 @@
25 25 array_unshift($this->groups, $seprator);
26 26 array_unshift($this->groups, $allGroups);
27 27 }
28 28
29 - public function display($page)
29 + public function display(string $page): void
30 30 {
31 31 $name = 'acl_'.$page;
32 32
33 - $selected = explode(',', $this->config->get($name, 'all'));
33 + $selected = explode(',', $this->config->get($name, ACYM_ADMIN_GROUP));
34 34
35 - return acym_selectMultiple($this->groups, 'config['.$name.']', $selected, ['class' => 'acym__select']);
35 + acym_selectMultiple(
36 + $this->groups,
37 + 'config['.$name.']',
38 + $selected,
39 + ['class' => 'acym__select'],
40 + 'value',
41 + 'text',
42 + true
43 + );
36 44 }
37 45 }