userMustBeLoggedIn, '---
');exit; if (empty($filter)) { foreach ($plugin as $keyJson => $valueJson) { $filter[$keyJson] = " "; } } //var_dump($filter);exit; echo '
'; echo ''; echo ''; echo ''; $pluginsList = []; if (!AVideoPlugin::exists($pluginName)) { echo ""; } else { if (!empty($plugin)) { $form = jsonToFormElements($plugin, $filter); //var_dump($form); echo implode("", $form); } echo ""; } echo '
".__('Sorry you do not have the plugin')."
'; } function jsonToFormElements($json, $filter = []) { //var_dump($json, $filter);exit; $elements = []; foreach ($json as $keyJson => $valueJson) { if (!empty($filter) && empty($filter[$keyJson])) { continue; } $label = ""; $help = ''; if (!empty($filter[$keyJson])) { $help = "{$filter[$keyJson]}"; } $input = ''; if (is_object($valueJson)) { if ($valueJson->type === 'textarea') { $input = ""; } elseif (is_array($valueJson->type)) { $input = ""; } else { if (!is_string($valueJson->type) || !is_string($valueJson->value)) { continue; } $input = ""; } $elements[] = "{$label} {$input}{$help}"; } elseif (is_bool($valueJson)) { //var_dump($keyJson, $valueJson, '---
'); $id = uniqid(); $input = '
'; $elements[] = "{$input}{$label}
{$help}"; } else { $input = ""; $elements[] = "{$label} {$input}{$help}"; } } return $elements; } function getPluginSwitch($pluginName) { if (!AVideoPlugin::exists($pluginName)) { $input = ''.__('Buy this plugin now').''; } else { $plugin = AVideoPlugin::loadPluginIfEnabled($pluginName); $pluginForced = AVideoPlugin::loadPlugin($pluginName); $id = uniqid(); $uuid = $pluginForced->getUUID(); $input = '
'; } return $input; }