diff --git a/Plugin/System/Config/Banner.php b/Plugin/System/Config/Banner.php new file mode 100644 index 00000000..1de59a33 --- /dev/null +++ b/Plugin/System/Config/Banner.php @@ -0,0 +1,94 @@ +_moduleManager = $moduleManager; + } + + /** + * @param Docs $subject + * @param $result + * @param AbstractElement $element + * + * @return mixed + */ + public function afterRender(Docs $subject, $result, AbstractElement $element) + { + if ($this->isHideBanner($element)) { + return $result; + } + $bannerImg = $subject->getViewFileUrl('Mageplaza_Blog::media/banner/banner.png'); + $html = << + require([ 'jquery'], function ($) { + var session = $(".accordion" ); + $("" + + "").insertBefore(session); + }) + + HTML; + + $result = $html . $result; + + return $result; + } + + /** + * @param $element + * @return bool + */ + protected function isHideBanner($element) + { + if ($element->getOriginalData()['module_name'] !== 'Mageplaza_Blog') { + return true; + } + + if ($this->_moduleManager->isOutputEnabled('Mageplaza_BlogPro')) { + return true; + } + + return false; + } +} diff --git a/composer.json b/composer.json index 1c1f776a..265d7027 100755 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "facebook/graph-sdk": "^5.7.0" }, "type": "magento2-module", - "version": "4.2.0", + "version": "4.2.1", "license": "proprietary", "keywords": [ "magento 2", diff --git a/etc/adminhtml/di.xml b/etc/adminhtml/di.xml index 53a8803f..70047c90 100644 --- a/etc/adminhtml/di.xml +++ b/etc/adminhtml/di.xml @@ -50,4 +50,8 @@ + + + + diff --git a/view/base/web/media/banner/banner.png b/view/base/web/media/banner/banner.png new file mode 100644 index 00000000..c129c0ba Binary files /dev/null and b/view/base/web/media/banner/banner.png differ