Skip to content

Commit b0bccd8

Browse files
authored
ENGCOM-3669: [2.3] Made logo clickable on home page #19198
2 parents 5a298ad + abb3757 commit b0bccd8

File tree

2 files changed

+12
-16
lines changed
  • app/code/Magento/Theme

2 files changed

+12
-16
lines changed

app/code/Magento/Theme/Block/Html/Header/Logo.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public function __construct(
4343
/**
4444
* Check if current url is url for home page
4545
*
46+
* @deprecated This function is no longer used. It was previously used by
47+
* Magento/Theme/view/frontend/templates/html/header/logo.phtml
48+
* to check if the logo should be clickable on the homepage.
49+
*
4650
* @return bool
4751
*/
4852
public function isHomePage()

app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,11 @@
1212
?>
1313
<?php $storeName = $block->getThemeName() ? $block->getThemeName() : $block->getLogoAlt();?>
1414
<span data-action="toggle-nav" class="action nav-toggle"><span><?= /* @escapeNotVerified */ __('Toggle Nav') ?></span></span>
15-
<?php if ($block->isHomePage()):?>
16-
<strong class="logo">
17-
<?php else: ?>
18-
<a class="logo" href="<?= $block->getUrl('') ?>" title="<?= /* @escapeNotVerified */ $storeName ?>">
19-
<?php endif ?>
20-
<img src="<?= /* @escapeNotVerified */ $block->getLogoSrc() ?>"
21-
title="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
22-
alt="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
23-
<?= $block->getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
24-
<?= $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>
25-
/>
26-
<?php if ($block->isHomePage()):?>
27-
</strong>
28-
<?php else:?>
29-
</a>
30-
<?php endif?>
15+
<a class="logo" href="<?= $block->getUrl('') ?>" title="<?= /* @escapeNotVerified */ $storeName ?>">
16+
<img src="<?= /* @escapeNotVerified */ $block->getLogoSrc() ?>"
17+
title="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
18+
alt="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
19+
<?= $block->getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
20+
<?= $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>
21+
/>
22+
</a>

0 commit comments

Comments
 (0)