public function register_front_assets() { if (ESSBCoreHelper::is_plugin_deactivated_on() || ESSBCoreHelper::is_module_deactivate_on('fanscounter')) { return; } essb_resource_builder()->add_static_resource(ESSB3_PLUGIN_URL . '/lib/modules/social-followers-counter/assets/css/essb-followers-counter.min.css', 'essb-social-followers-counter', 'css'); }
public function register_front_assets() { if (ESSBCoreHelper::is_plugin_deactivated_on() || ESSBCoreHelper::is_module_deactivate_on('fanscounter')) { return; } wp_enqueue_script('jquery'); wp_register_style('essb-social-fanscounter', ESSB3_PLUGIN_URL . '/lib/modules/social-fans-counter/assets/css/essb-social-fanscounter.css', false, ESSB3_VERSION); //wp_enqueue_script( 'essb-social-fanscounter-script' , ESSB3_PLUGIN_URL . '/lib/modules/social-fans-counter/assets/js/essb-social-fanscounter.js' , false , ESSB3_VERSION ); wp_enqueue_style('essb-social-fanscounter'); //wp_enqueue_script( 'essb-social-fanscounter-script' ); wp_localize_script('essb-social-fanscounter-script', 'essb3fanscounter_object', array('ajaxurl' => admin_url('admin-ajax.php'))); }
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 essb_ctt_scripts() { if (!ESSBCoreHelper::is_plugin_deactivated_on() && !ESSBCoreHelper::is_module_deactivate_on('ctt')) { wp_register_style('essb-cct-style', plugins_url('assets/css/styles.css', __FILE__), false, ESSB3_VERSION, 'all'); wp_enqueue_style('essb-cct-style'); } }
function essb_ctt_scripts() { if (!ESSBCoreHelper::is_plugin_deactivated_on() && !ESSBCoreHelper::is_module_deactivate_on('ctt')) { //wp_register_style ( 'essb-cct-style', plugins_url ( 'assets/css/styles.css', __FILE__ ), false, ESSB3_VERSION, 'all' ); //$resource_builder = ESSBResourceBuilder::get_instance(); essb_resource_builder()->add_static_resource(plugins_url('assets/css/styles.css', __FILE__), 'essb-cct-style', 'css'); //wp_enqueue_style ( 'essb-cct-style' ); } }
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 }