summaryrefslogtreecommitdiff
path: root/icon_browser.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-04 11:43:00 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-04 11:43:00 +0100
commit3db2788ab3457128ff3e043506cff28adc50f021 (patch)
tree1378328943f5e46d96a667e96e69f619edd01fb3 /icon_browser.php
parent454c8c5135589a3e2f6ec98c50aec970e2809bec (diff)
downloadthemes-3db2788ab3457128ff3e043506cff28adc50f021.tar.gz
themes-3db2788ab3457128ff3e043506cff28adc50f021.tar.bz2
themes-3db2788ab3457128ff3e043506cff28adc50f021.zip
icon_browser: add used_only filter to show only icons in active use
?used_only=1 filters the list to the ~70 icons in $iconUsage. Toggle link in the template switches between full and filtered view. icon_style filter is preserved across the toggle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'icon_browser.php')
-rwxr-xr-xicon_browser.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/icon_browser.php b/icon_browser.php
index 68d5a5b..8cdf596 100755
--- a/icon_browser.php
+++ b/icon_browser.php
@@ -131,9 +131,15 @@ foreach( $iconThemes as $iconStyle ) {
}
}
+$usedOnly = !empty( $_REQUEST['used_only'] );
+if( $usedOnly ) {
+ $iconNames = array_intersect_key( $iconNames, $iconUsage );
+}
+
asort( $iconNames );
$gBitSmarty->assign( 'iconNames', $iconNames );
$gBitSmarty->assign( 'iconList', $iconList );
+$gBitSmarty->assign( 'usedOnly', $usedOnly );
$gBitSystem->display( 'bitpackage:themes/icon_browser.tpl', KernelTools::tra( 'Icon Listing' ) , [ 'display_mode' => 'display' ]);