Skip to content

Commit

Permalink
ENGCOM-3669: [2.3] Made logo clickable on home page #19198
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko authored Dec 12, 2018
2 parents 5a298ad + abb3757 commit b0bccd8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
4 changes: 4 additions & 0 deletions app/code/Magento/Theme/Block/Html/Header/Logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public function __construct(
/**
* Check if current url is url for home page
*
* @deprecated This function is no longer used. It was previously used by
* Magento/Theme/view/frontend/templates/html/header/logo.phtml
* to check if the logo should be clickable on the homepage.
*
* @return bool
*/
public function isHomePage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,11 @@
?>
<?php $storeName = $block->getThemeName() ? $block->getThemeName() : $block->getLogoAlt();?>
<span data-action="toggle-nav" class="action nav-toggle"><span><?= /* @escapeNotVerified */ __('Toggle Nav') ?></span></span>
<?php if ($block->isHomePage()):?>
<strong class="logo">
<?php else: ?>
<a class="logo" href="<?= $block->getUrl('') ?>" title="<?= /* @escapeNotVerified */ $storeName ?>">
<?php endif ?>
<img src="<?= /* @escapeNotVerified */ $block->getLogoSrc() ?>"
title="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
alt="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
<?= $block->getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
<?= $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>
/>
<?php if ($block->isHomePage()):?>
</strong>
<?php else:?>
</a>
<?php endif?>
<a class="logo" href="<?= $block->getUrl('') ?>" title="<?= /* @escapeNotVerified */ $storeName ?>">
<img src="<?= /* @escapeNotVerified */ $block->getLogoSrc() ?>"
title="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
alt="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
<?= $block->getLogoWidth() ? 'width="' . $block->getLogoWidth() . '"' : '' ?>
<?= $block->getLogoHeight() ? 'height="' . $block->getLogoHeight() . '"' : '' ?>
/>
</a>

0 comments on commit b0bccd8

Please sign in to comment.