function include_social_image_share()
 {
     global $essb_options;
     if (ESSBCoreHelper::is_plugin_deactivated_on() || ESSBCoreHelper::is_module_deactivate_on('sis')) {
         return;
     }
     $mobile_detect = new ESSB_Mobile_Detect();
     if ($mobile_detect->isMobile() && !ESSBOptionValuesHelper::options_bool_value($essb_options, 'sis_on_mobile')) {
         return false;
     }
     $current_post_address = ESSBUrlHelper::get_current_page_url();
     $current_post_address = ESSBUrlHelper::attach_tracking_code($current_post_address, 'essb-image-share=yes');
     $calling = 'jQuery(document).ready(function(){jQuery("' . $this->get_settings('sis_selector', 'img') . '").essbis({selector:"' . $this->get_settings('sis_selector', 'img') . '",dontshow:"' . $this->get_settings('sis_dontshow') . '",minWidth:' . $this->get_settings('sis_minWidth', '100') . ',minHeight:' . $this->get_settings('sis_minHeight', '100') . ',align:{x:"' . $this->get_settings('sis_align_x', 'left') . '",y:"' . $this->get_settings('sis_align_y', 'top') . '"},offset:{x:' . $this->get_settings('sis_offset_x', '0') . ',y:' . $this->get_settings('sis_offset_y', '0') . '},orientation:"' . $this->get_settings('sis_orientation') . '",style:"' . $this->get_settings('sis_style') . '",sharer:"' . ($this->get_settings('sis_sharer') == 'true' ? $current_post_address : '') . '",is_mobile:' . ($mobile_detect->isMobile() ? 'true' : 'false') . ',always_show:' . $this->get_settings('sis_always_show', 'false') . ',pinterest_alt:' . $this->get_settings('sis_pinterest_alt', 'false') . ',primary_menu: [ ' . $this->get_primary_menu() . '],avoid_class: "' . $this->get_settings('sis_dontaddclass') . '"});});';
     essb_resource_builder()->add_js($calling, true, 'essb-onmedia-code');
 }
 function __construct()
 {
     global $essb_options;
     $is_active = false;
     if (ESSBOptionValuesHelper::options_bool_value($essb_options, 'profiles_display')) {
         $is_active = true;
         if (ESSBOptionValuesHelper::options_bool_value($essb_options, 'profiles_mobile_deactivate')) {
             $mobile = new ESSB_Mobile_Detect();
             if ($mobile->isMobile()) {
                 $is_active = false;
             }
         }
     }
     if ($is_active) {
         add_action('wp_footer', array($this, 'display_profiles'));
     }
 }
    function include_social_image_share()
    {
        global $essb_options;
        if (ESSBCoreHelper::is_plugin_deactivated_on() || ESSBCoreHelper::is_module_deactivate_on('sis')) {
            return;
        }
        $mobile_detect = new ESSB_Mobile_Detect();
        if ($mobile_detect->isMobile() && !ESSBOptionValuesHelper::options_bool_value($essb_options, 'sis_on_mobile')) {
            return false;
        }
        $current_post_address = ESSBUrlHelper::get_current_page_url();
        $current_post_address = ESSBUrlHelper::attach_tracking_code($current_post_address, 'essb-image-share=yes');
        ?>

<script>

				<?php 
        echo $calling = $this->get_settings('sis_always_show') === 'true' ? 'jQuery(window).load(function(){' : 'jQuery(document).ready(function(){';
        ?>
					jQuery('<?php 
        echo $this->get_settings('sis_selector', 'img');
        ?>
').socialImageShare({
						selector: "<?php 
        echo $this->get_settings('sis_selector', 'img');
        ?>
",
						dontshow: "<?php 
        echo $this->get_settings('sis_dontshow');
        ?>
",
						title: "<?php 
        echo $this->get_settings('sis_title');
        ?>
",
						summary: "<?php 
        echo $this->get_settings('sis_summary');
        ?>
",
						minWidth: <?php 
        echo $this->get_settings('sis_minWidth', '100');
        ?>
,
						minHeight: <?php 
        echo $this->get_settings('sis_minHeight', '100');
        ?>
,
						fb_app: "<?php 
        echo $this->get_settings('sis_fb_app');
        ?>
",
						scroll: <?php 
        echo $this->get_settings('sis_scroll', 'false', true);
        ?>
,				
						align: { x: "<?php 
        echo $this->get_settings('sis_align_x', 'left');
        ?>
", y: "<?php 
        echo $this->get_settings('sis_align_y', 'top');
        ?>
" },
						offset: { x: <?php 
        echo $this->get_settings('sis_offset_x', '0');
        ?>
, y: <?php 
        echo $this->get_settings('sis_offset_y', '0');
        ?>
 },
						orientation: "<?php 
        echo $this->get_settings('sis_orientation');
        ?>
",
						style: '<?php 
        echo $this->get_settings('sis_style');
        ?>
',
						sharer: "<?php 
        echo $sharer = $this->get_settings('sis_sharer') == 'true' ? $current_post_address : '';
        ?>
",
						is_mobile: <?php 
        echo $is_mobile = $mobile_detect->isMobile() ? 'true' : 'false';
        ?>
,
						always_show: <?php 
        echo $this->get_settings('sis_always_show', 'false');
        ?>
,	
					    pinterest_alt: <?php 
        echo $this->get_settings('sis_pinterest_alt', 'false');
        ?>
,
						primary_menu: [ <?php 
        echo $this->get_primary_menu();
        ?>
 ],	
					});
				});
				</script>

<?php 
    }
 /**
  * isMobile
  * 
  * Checks and return state of mobile device detected
  * 
  * @return boolean
  * @since 3.4.2
  */
 public function isMobile()
 {
     if (!$this->mobile_checked) {
         $this->mobile_checked = true;
         $mobile_detect = new ESSB_Mobile_Detect();
         $this->is_mobile = $mobile_detect->isMobile();
         $this->is_tablet = $mobile_detect->isTablet();
         if ($this->optionsBoolValue('mobile_exclude_tablet') && $this->is_tablet) {
             $this->is_mobile = false;
         }
         return $this->is_mobile;
     } else {
         return $this->is_mobile;
     }
 }