Skip to content

Commit c007705

Browse files
author
Jen Lampton
committed
Fix bug with missing non-square icons.
1 parent bda5a0c commit c007705

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

on_the_web.module

+6-5
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,12 @@ function on_the_web_display_block($delta, $settings = array(), $contexts = array
185185
$classes = array('on-the-web', 'otw-' . $size, 'otw-' . $service);
186186

187187
$icon = FALSE;
188-
if (isset($info['fa-icon'])) {
189-
$icon = $info['fa-icon'];
190-
}
191-
if ($config->get('type') == 'font' && $config->get('square') == TRUE) {
192-
if (isset($info['fa-icon-square'])) {
188+
if ($config->get('type') == 'font') {
189+
if (isset($info['fa-icon'])) {
190+
$icon = $info['fa-icon'];
191+
}
192+
// Only use a square version if it exists.
193+
if ($config->get('square') == TRUE && isset($info['fa-icon-square'])) {
193194
$icon = $info['fa-icon-square'];
194195
}
195196
}

0 commit comments

Comments
 (0)