public function renderSettings($filePath = '', $echo = false)
 {
     return parent::renderSettings(plugin_dir_path(__FILE__) . 'settings.php', $echo);
 }
 private function setSuppressOthers()
 {
     // Setting supress others option
     erpPROPaths::requireOnce(erpPROPaths::$erpPROTheme);
     if ($this->optObj->getSuppressOthers() === true) {
         erpPROTheme::suppressOthers(true);
     } elseif ($this->optObj->getSuppressOthers() === false) {
         erpPROTheme::suppressOthers(false);
     }
 }
 public function renderSettings($widgetInstance, $filePath = '', $echo = false)
 {
     $this->options['widgetInstance'] = $widgetInstance;
     return parent::renderSettings(plugin_dir_path(__FILE__) . 'settings.php', $echo);
 }
 /**
  * Set suppressOthers field
  * @param bool $value Default is true
  */
 public static function suppressOthers($value = true)
 {
     self::$supressOthers = $value;
 }
 /**
  * Decides if content should be modified, if yes calls content modifier
  *
  * @param string $content
  * @return string
  * @author Panagiotis Vagenas <*****@*****.**>
  * @since 1.0.0
  */
 public function contentFilter($content)
 {
     global $post;
     /**
      * Check if is time to take action
      */
     if ($this->isShowTime($post) && !$this->isInExcludedPostTypes($post) && !$this->isInExcludedTaxonomies($post) && (bool) $this->mainOpts->getValue('activate')) {
         erpPROPaths::requireOnce(erpPROPaths::$erpPROTheme);
         if (erpPROTheme::areOthersSuppressed()) {
             return $content;
         }
         erpPROPaths::requireOnce(erpPROPaths::$VPluginThemeFactory);
         erpPROPaths::requireOnce(erpPROPaths::$erpProRelated);
         $relatedObj = erpProRelated::get_instance($this->mainOpts);
         $result = $relatedObj->getRelated($post->ID);
         $ratings = $relatedObj->getRatingsFromRelDataObj();
         if (empty($result) || empty($result->posts)) {
             return $content;
         }
         VPluginThemeFactory::registerThemeInPathRecursive(erpPROPaths::getAbsPath(erpPROPaths::$mainThemesFolder), $this->mainOpts->getDsplLayout());
         $theme = VPluginThemeFactory::getThemeByName($this->mainOpts->getDsplLayout(), 'main');
         if (!$theme) {
             return $content;
         }
         $theme->formPostData($result, $this->mainOpts, $ratings);
         $relContent = $theme->render();
         return $this->mainOpts->getPosition() == 'top' ? $relContent . $content : $content . $relContent;
     }
     return $content;
 }