Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>