. * For any other query please contact us at contact[at]eleopard[dot]in */ if (!class_exists('EDS_Mobile_Detect')): include_once 'assets/helper/Mobile_Detect.php'; endif; include_once 'eds_tinymce.php'; function detectDevice() { static $deviceType = null; if(!$deviceType) { $detect = new EDS_Mobile_Detect(); $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer'); } return $deviceType; } function set_edsanimate_options(){ add_option('scroll_offset' ,'75' ,'Percentage height of the element '. 'after which animation should get applied' ); add_option('enable_on_phone' ,'0' ,'Animation should work on smartphones or not.'); add_option('enable_on_tab' ,'1' ,'Animation should work on tablets or not.'); } function unset_edsanimate_options(){ delete_option('scroll_offset'); delete_option('enable_on_phone'); delete_option('enable_on_tab'); } function admin_edsanimate_options(){ ?>
Options saved.
Failed to save options.
option_name); $widget_num = $widget_obj['params'][0]['number']; if (isset($widget_opt[$widget_num]['eds_animation_class'])){ $eds_animation_class = $widget_opt[$widget_num]['eds_animation_class']; $params[0]['before_widget'] = preg_replace('/class="/', 'class=" '.$eds_animation_class , $params[0]['before_widget'], 1); } return $params; } //Admin Menu Options Filters add_filter('widget_text', 'do_shortcode'); register_activation_hook(__FILE__, 'set_edsanimate_options'); register_deactivation_hook(__FILE__, 'unset_edsanimate_options'); add_action('in_widget_form', 'eds_add_custom_class_field',5,3); add_filter('widget_update_callback', 'eds_update_widget_animation_class',5,3); add_filter('dynamic_sidebar_params', 'eds_add_widget_animation_class'); add_action('admin_menu', 'modify_menu'); add_shortcode('edsanimate', 'edsanimate_handler'); add_action('wp_enqueue_scripts', 'add_eds_script_and_css');