コード例 #1
0
ファイル: ShareThis.php プロジェクト: AmineCherrai/rostanvo
 /**
  * Generate and return the ShareThis markup
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->getTemplate()) {
         if ($this->isEnabled() && $this->canDisplayOnPost()) {
             return $this->getJs() . $this->getHtml($this->getPost());
         }
     }
     return parent::_toHtml();
 }
コード例 #2
0
 /**
  * If the plugin is enabled, display the form component
  *
  * @return $this
  */
 protected function _beforeToHtml()
 {
     if ($this->helper('wordpress')->isPluginEnabled('comment-reply-notification')) {
         if (!$this->getTemplate()) {
             $this->setTemplate('wordpress/plugin/comment-reply-notification/form.phtml');
         }
         if ($options = Mage::helper('wordpress')->getWpOption('commentreplynotification')) {
             $options = unserialize($options);
             if (isset($options['mail_notify']) && in_array($options['mail_notify'], array('parent_check', 'parent_uncheck'))) {
                 $this->setIsEnabled(true);
                 $this->setOptInChecked($options['mail_notify'] === 'parent_check');
             }
         }
     }
     return parent::_beforeToHtml();
 }