optionslib->get_option('version_dialog_header'); ?>
optionslib) ? $this->optionslib->get_option('version_dialog') : 'release_notes'; if ($versionDialogMode == 'custom_text' || $versionDialogMode == 'both') { ?>
optionslib) ? $this->optionslib->get_option('version_dialog_text') : null; if ($versionDialogText !== null) { $versionDialogTextWithLinks = preg_replace('/(https?:\/\/[^\s<]+)/', '$1', $versionDialogText); echo nl2br($versionDialogTextWithLinks); } else { echo 'No Version Dialog text set. Go to the Admin Menu and set one.'; } ?>
[ 'header' => 'User-Agent: Cloudlog - Amateur Radio Logbook' ] ]; $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response !== false) { $data = json_decode($response, true); $current_version = $this->optionslib->get_option('version'); if ($data !== null && !empty($data)) { foreach ($data as $singledata) { if ($singledata['tag_name'] == $current_version) { $firstRelease = $singledata; continue; } } $releaseBody = isset($firstRelease['body']) ? $firstRelease['body'] : 'No release information available'; $htmlReleaseBody = htmlspecialchars($releaseBody); $htmlReleaseBodyWithLinks = preg_replace('/(https?:\/\/[^\s<]+)/', '$1', $htmlReleaseBody); $releaseName = isset($firstRelease['name']) ? $firstRelease['name'] : 'No version name information available'; echo "

v" . $releaseName . "

"; echo "
" . $releaseBody . "
"; echo "
"; } else { echo 'Error decoding JSON data or received empty response.'; } } else { echo 'Error retrieving data from the GitHub API.'; } ?>