$sw_ver"; return $outstr; } if ( ! shortcode_exists( 'ff_hh_versions' ) ) { add_shortcode( 'ff_hh_versions', 'ff_hh_shortcode_versions'); } // Example: // [ff_hh_versions] function ff_hh_shortcode_versions( $atts, $content, $name ) { $manifest = ff_hh_getmanifest(FF_HH_STABLE_BASEDIR); $outstr = "
"; $outstr .= ''; foreach ($manifest as $hw => $versions) { // beautify HW model names if (!strncmp($hw, 'tp-link', 7)) { $hw = strtoupper($hw); $hw = str_replace('-', ' ', $hw); $hw = str_replace('TP LINK TL ', 'TP-Link TL-', $hw); } elseif (!strncmp($hw, 'ubiquiti', 8)) { $hw = str_replace('-', ' ', $hw); $hw = ucwords($hw); } $outstr .= sprintf('', $hw); // factory versions $hw_ver_links = array(); foreach ($versions as $hw_ver => $filename) { $filename = str_replace('-sysupgrade', '', $filename); $hw_ver_links[] = sprintf('%s.x', FF_HH_STABLE_BASEDIR.'factory/', $filename, $hw_ver); } $outstr .= ''; // sysupgrade versions $hw_ver_links = array(); foreach ($versions as $hw_ver => $filename) { $hw_ver_links[] = sprintf('%s.x', FF_HH_STABLE_BASEDIR.'sysupgrade/', $filename, $hw_ver); } $outstr .= ''; $outstr .= ''; } $outstr .= '
ModellErstinstallationAktualisierung
%sHardware Version ' . join(', ', $hw_ver_links) . 'Hardware Version ' . join(', ', $hw_ver_links) . '
'; $outstr .= '
'; // $outstr .= '
'.print_r($manifest, true).'
'; return $outstr; }