Commit 6bc1fdf7 by halweg

feat: 设置关闭跳过ins代码

parent 7c13cdc9
......@@ -172,4 +172,13 @@ class MediaFeed extends Template {
return $feed;
}
public function isOpen()
{
return $this->_objectManager->get(ScopeConfigInterface::class)
->getValue(
'joshine_instagram_feed/general/enabled',
ScopeInterface::SCOPE_STORE
);
}
}
\ No newline at end of file
<?php
/** @var $block \Joshine\InstagramFeed\Block\MediaFeed */
$media = $block->getMedia()['data'];
?>
?>
<?php if ($block->isOpen()): ?>
<style>
.instagram-feed-container .instagram-feed-title {
background: #fff;
......@@ -13,7 +13,6 @@ $media = $block->getMedia()['data'];
padding: 40px;
text-align: center;
}
.instagram-feed-container {
margin: 0 auto;
-webkit-user-select: none;
......@@ -201,7 +200,7 @@ $media = $block->getMedia()['data'];
padding: 10px;
}
</style>
<?php $media = $block->getMedia()['data']; ?>
<?php if (!empty($media)): ?>
<div id="joshine-section-app-block-instagram" class="joshine-section spaced-section">
<div class="instagram-container">
......@@ -300,4 +299,5 @@ $media = $block->getMedia()['data'];
});
});
</script>
\ No newline at end of file
</script>
<? endif; ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment