Browse Source

[UPDATE] improve options array flexibility

experimental
Georgi Hristov 2 years ago
parent
commit
a44789973b
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      modules/Utils/LeightboxPrompt/LeightboxPrompt_0.php

+ 4
- 0
modules/Utils/LeightboxPrompt/LeightboxPrompt_0.php View File

@@ -40,6 +40,10 @@ class Utils_LeightboxPrompt extends Module {
public function add_options($options) {
foreach ($options as $option => $desc) {
$desc = is_array($desc)? $desc: [
'label' => $desc
];
$desc['label'] = $desc['label']?? $option;
$desc['active'] = $desc['active']?? true;


Loading…
Cancel
Save