diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-04 12:02:12 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-04 12:02:12 +0100 |
| commit | a43fb0901946ccf5b81e6bd558fdb9321d9edcf0 (patch) | |
| tree | ab4c1980b8ae085e291345dfd7a7a643a09ab755 | |
| parent | ef0daf530e35ffc55a41b45fbbd7d969409c7d40 (diff) | |
| download | themes-a43fb0901946ccf5b81e6bd558fdb9321d9edcf0.tar.gz themes-a43fb0901946ccf5b81e6bd558fdb9321d9edcf0.tar.bz2 themes-a43fb0901946ccf5b81e6bd558fdb9321d9edcf0.zip | |
biticon: respect site_icon_size for menu and quicktag locations
ilocation=menu and ilocation=quicktag were hardcoded to small/,
ignoring the site_icon_size config. Now all locations use the config
value (or explicit isize= if provided), so changing Default Icon Size
in Theme Settings affects the entire site uniformly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rwxr-xr-x | smartyplugins/function.biticon.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/smartyplugins/function.biticon.php b/smartyplugins/function.biticon.php index a5ce139..e219036 100755 --- a/smartyplugins/function.biticon.php +++ b/smartyplugins/function.biticon.php @@ -132,22 +132,18 @@ function smarty_function_biticon( $pParams, $pSmall = false ) { // if we don't have an ipath yet, we will set it here if( $pParams['ipath'] == '/' ) { - // iforce is generally only set in menus - we might need a parameter to identify menus more accurately + $configSize = !empty( $pParams['isize'] ) ? $pParams['isize'] : $gBitSystem->getConfig( 'site_icon_size', 'small' ); if( !empty( $pParams['ilocation'] )) { if( $pParams['ilocation'] == 'menu' ) { - $pParams['ipath'] .= 'small/'; + $pParams['ipath'] .= $configSize.'/'; $pParams['iforce'] = 'icon_text'; } elseif( $pParams['ilocation'] == 'quicktag' ) { - $pParams['ipath'] .= 'small/'; + $pParams['ipath'] .= $configSize.'/'; $pParams['iforce'] = 'icon'; $pParams['iclass'] = 'quicktag icon'; } } else { - if( !empty( $pParams['isize'] )) { - $pParams['ipath'] .= $pParams['isize'].'/'; - } else { - $pParams['ipath'] .= $gBitSystem->getConfig( 'site_icon_size', 'small' ).'/'; - } + $pParams['ipath'] .= $configSize.'/'; } } |
