diff --git a/README.md b/README.md index 0e419f9..065ece7 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,15 @@ Input data is read from http://gw09.hamburg.freifunk.net/stable/sysupgrade/manif Output looks like this: ![shortcode output example](http://mschuette.name/wp/wp-upload/freifunk_versions.png) + +Arguments +--------- +An optional argument `grep` allows you show a subset of hardware versions, +Example: + +``` + TP-Link Firmware: [ff_hh_versions grep="tp-link"] + + Ubiquiti Firmware: [ff_hh_versions grep="ubiquiti"] +``` + diff --git a/freifunk-versions.php b/freifunk-versions.php index b79c7f3..b942e72 100644 --- a/freifunk-versions.php +++ b/freifunk-versions.php @@ -71,25 +71,41 @@ if ( ! shortcode_exists( 'ff_hh_versions' ) ) { } // Example: // [ff_hh_versions] +// [ff_hh_versions grep="ubiquiti"] function ff_hh_shortcode_versions( $atts, $content, $name ) { $manifest = ff_hh_getmanifest(FF_HH_STABLE_BASEDIR); $outstr = "
Modell | Erstinstallation | Aktualisierung |
---|---|---|
%s | ', $hw); + $outstr .= sprintf("\n||
%s | ", $hw); // factory versions $hw_ver_links = array();