Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Dec 7, 2022
1 parent cee209a commit bf5b01b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions view/frontend/templates/post/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
<div class='post-date post-meta-item'><?= $post->getPostDate() ?></div>
<div class='post-entry'>
<?php if ($image = $post->getImage()) {
/**
* 2020-03-25
* 1) "Force blog images to have the same dimensions
* as it was before the 1.3.0.24 → 2.0.11.14 `FishPig_WordPress` module upgrade":
* https://github.com/tradefurniturecompany/core/issues/27
* 2) I have ported the solution from 1.3.0.24:
* https://github.com/bentideswell/magento2-wordpress-integration/blob/1.3.0.24/view/frontend/templates/post/view.phtml#L14
*/
# 2020-03-25
# 1) "Force blog images to have the same dimensions
# as it was before the 1.3.0.24 → 2.0.11.14 `FishPig_WordPress` module upgrade":
# https://github.com/tradefurniturecompany/core/issues/27
# 2) I have ported the solution from 1.3.0.24:
# https://github.com/bentideswell/magento2-wordpress-integration/blob/1.3.0.24/view/frontend/templates/post/view.phtml#L14
$imageUrl = $image->getAvailableImage(); ?>
<div class='post-image'>
<a href='<?= $post->getUrl() ?>' title='<?= $this->escapeHtml($post->getPostTitle()) ?>'><img src='<?= $imageUrl ?>' alt='<?= $this->escapeHtml($post->getPostTitle()) ?>'/></a>
Expand Down

0 comments on commit bf5b01b

Please sign in to comment.