Skip to content

Commit 3fc6fde

Browse files
committed
Fix build select menu
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent b490c0b commit 3fc6fde

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

event/listener.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function add_googleanalytics_configs($event)
119119
'lang' => 'ACP_GOOGLEANALYTICS_TAG',
120120
'validate' => 'int',
121121
'type' => 'select',
122-
'function' => 'build_select',
122+
'function' => [$this, 'build_select'],
123123
'params' => [[
124124
0 => 'ACP_GA_ANALYTICS_TAG',
125125
1 => 'ACP_GA_GTAGS_TAG',
@@ -171,4 +171,16 @@ public function validate_googleanalytics_id($event)
171171
// Update error event data
172172
$event['error'] = $error;
173173
}
174+
175+
/**
176+
* Get select options for ACP
177+
*
178+
* @param array $options
179+
* @param bool|int|string $default
180+
* @return array
181+
*/
182+
public function build_select(array $options, bool|int|string $default): array
183+
{
184+
return ['options' => build_select($options, $default)];
185+
}
174186
}

0 commit comments

Comments
 (0)