Browse Source

Merge pull request #12 from georgehristov/lbp_flexibility

Improve LeightBoxPormpt add_options flexibility
experimental
Janusz Tylek 2 years ago
committed by GitHub
parent
commit
b0aa7f1e72
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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