Skip to content

Commit

Permalink
Call getShowEcho once
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts authored and JeroenDeDauw committed Jun 2, 2021
1 parent f4de37e commit 135d1f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Components/NavbarHorizontal/PersonalTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ protected function getTools() {
}

if ( in_array( $key, self::ECHO_LINK_KEYS ) ) {
if ( $this->getShowEcho() === self::SHOW_ECHO_LINKS ) {
$showEcho = $this->getShowEcho();
if ( $showEcho === self::SHOW_ECHO_LINKS ) {
// Remove Echo classes to render as a link
unset( $item['links'][0]['class'] );
} elseif ( $this->getShowEcho() === self::SHOW_ECHO_ICONS ) {
} elseif ( $showEcho === self::SHOW_ECHO_ICONS ) {
// Icons will be rendered elsewhere
continue;
}
Expand Down

0 comments on commit 135d1f6

Please sign in to comment.