示例#1
0
 /**
  * Returns an array of the container classes.
  * @return array
  */
 protected function getContainerClasses()
 {
     $classes = array('supsystic-social-sharing', 'supsystic-social-sharing-package-' . strtolower($this->getName()));
     if ($this->project->isHiddenOnHomePage()) {
         $classes[] = 'supsystic-social-sharing-hide-on-homepage';
     }
     if ($this->isHomepage()) {
         $classes[] = 'supsystic-social-homepage';
     }
     if ($this->project->isHiddenOnMobile()) {
         $classes[] = 'supsystic-social-sharing-hide-on-mobile';
     }
     if ($this->project->isShowOnlyOnMobile()) {
         $classes[] = 'supsystic-social-sharing-show-only-on-mobile';
     }
     if (!$this->project->isPopupShow() && $this->project->isShowOnClick()) {
         $classes[] = 'supsystic-social-sharing-click';
     }
     if ($this->project->has('spacing')) {
         $classes[] = 'supsystic-social-sharing-spacing';
     }
     if ($this->project->isShowAtSidebar()) {
         $classes[] = 'supsystic-social-sharing-fixed';
         $classes[] = 'supsystic-social-sharing-' . $this->project->getExtra('left');
         if (function_exists('is_admin_bar_showing') && is_admin_bar_showing()) {
             $classes[] = 'supsystic-social-sharing-adminbar';
         }
     } else {
         $classes[] = 'supsystic-social-sharing-content';
         $alignInContent = $this->project->getAlignTypeInContent();
         switch ($alignInContent) {
             case 'left':
                 $classes[] = 'supsystic-social-sharing-content-align-left';
                 break;
             case 'right':
                 $classes[] = 'supsystic-social-sharing-content-align-right';
                 break;
             default:
                 $classes[] = 'supsystic-social-sharing-content-align-center';
         }
     }
     return $classes;
 }
示例#2
0
 protected function getBaseClasses()
 {
     $classes = array('supsystic-social-sharing', 'supsystic-social-sharing-package-' . $this->getName());
     if ($this->project->isHiddenOnMobile()) {
         $classes[] = 'supsystic-social-sharing-mobile';
     }
     if ($this->project->isShowOnClick()) {
         $classes[] = 'supsystic-social-sharing-click';
     }
     if ($this->project->get('spacing', 'off') === 'on') {
         $classes[] = 'supsystic-social-sharing-spacing';
     }
     if ($this->project->isShowAtSidebar()) {
         $classes[] = 'supsystic-social-sharing-fixed';
         $position = $this->project->getExtra() ? $this->project->getExtra() : 'left';
         $classes[] = 'supsystic-social-sharing-' . $position;
         if (is_admin_bar_showing()) {
             $classes[] = 'supsystic-social-sharing-adminbar';
         }
     } else {
         $classes[] = 'supsystic-social-sharing-content';
     }
     return $classes;
 }
示例#3
0
 /**
  * Callback method to render buttons inside the page or post.
  * @param string $content The content of the post
  * @return string
  */
 public function applyContentCallback($content)
 {
     $content = sprintf('%1$s%2$s%3$s', 'above' === $this->project->getExtra() || 'above_below' === $this->project->getExtra() ? $this->build() : '', $content, 'below' === $this->project->getExtra() || 'above_below' === $this->project->getExtra() ? $this->build() : '');
     return $content;
 }