| Name | Size | Mode | Actions |
|---|---|---|---|
| assets/ | - | 0755 | rm |
| build/ | - | 0755 | rm |
| lang/ | - | 0755 | rm |
| edsanimate.php | 25123 | 0644 | editdlrm |
| legal.txt | 555 | 0644 | editdlrm |
| LICENSE.txt | 32494 | 0644 | editdlrm |
| readme.txt | 8401 | 0644 | editdlrm |
| uninstall.php | 324 | 0644 | editdlrm |
/home/vianto5/ceibaresidencial.mx/wp-content/plugins/animate-it/edsanimate.php (25123B)
isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
}
return $device_type;
}
function add_eds_script_and_css() {
//Custom CSS//
$custom_css = get_option('eds_custom_css');
$device_type = $this->detect_device();
$enable_smart_phone = get_option('eds_enable_on_phone');
$enable_tablet = get_option('eds_enable_on_tab');
$enable= ($device_type=='phone' && intval($enable_smart_phone))
|| ($device_type =='tablet' && intval($enable_tablet))
|| ($device_type =='computer');
if($enable) {
wp_register_style( 'edsanimate-animo-css',plugins_url( '/assets/css/animate-animo.css', self::$abs_file ));
wp_register_script( 'edsanimate-animo-script',plugins_url( '/assets/js/animo.min.js', self::$abs_file ), array('jquery'), '1.0.3', true);
wp_register_script( 'edsanimate-throttle-debounce-script',plugins_url( '/assets/js/jquery.ba-throttle-debounce.min.js', self::$abs_file ), array('jquery'), '1.1', true);
//START: Scripts to Support Older Version
wp_register_script( 'viewportcheck-script',plugins_url( '/assets/js/viewportchecker.js', self::$abs_file), array('jquery', 'edsanimate-throttle-debounce-script' ), '1.4.4', true);
wp_register_script( 'edsanimate-script', plugins_url( '/assets/js/edsanimate.js', self::$abs_file ), array('viewportcheck-script'), '1.4.4', true );
//END: : Scripts to Support Older Version
wp_register_script( 'edsanimate-site-script', plugins_url( '/assets/js/edsanimate.site.js', self::$abs_file ), array('edsanimate-animo-script', 'edsanimate-throttle-debounce-script' ), '1.4.5', true );
$edsanimate_options = array( 'offset' => get_option('eds_scroll_offset', '75'),
'hide_hz_scrollbar' => get_option('eds_hide_overflow_x', '1'),
'hide_vl_scrollbar' => get_option('eds_hide_overflow_y', '0'));
wp_localize_script( 'edsanimate-site-script', 'edsanimate_options', $edsanimate_options);
//Enqueuing style sheets
wp_enqueue_style( 'edsanimate-animo-css' );
wp_add_inline_style( 'edsanimate-animo-css', sanitize_textarea_field( $custom_css ) );
//Enqueuing javascripts
wp_enqueue_script( 'edsanimate-animo-script');
wp_enqueue_script( 'edsanimate-throttle-debounce-script' );
wp_enqueue_script( 'viewportcheck-script');
wp_enqueue_script( 'edsanimate-script');
wp_enqueue_script( 'edsanimate-site-script');
} else {
if( file_exists( plugin_dir_path( self::$abs_file ) . "assets/css/custom.css" ) ) {
wp_register_style( 'edsanimate-custom-css',plugins_url( '/assets/css/custom.css', self::$abs_file ));
wp_enqueue_style( 'edsanimate-custom-css' );
} else {
if( $custom_css != null && trim($custom_css) != "" ) {
wp_register_style( 'edsanimate-blank-css',plugins_url( '/assets/css/blank.css', self::$abs_file ) );
wp_enqueue_style( 'edsanimate-blank-css' );
wp_add_inline_style( 'edsanimate-blank-css', sanitize_textarea_field( $custom_css ) );
}
}
}
}
function add_eds_script_and_css_admin() {
$custom_css = '.mce-tinymce-inline .mce-flow-layout { white-space: normal !important; }';
wp_register_style( 'edsanimate-blank-css',plugins_url( '/assets/css/blank.css', self::$abs_file ) );
wp_enqueue_style( 'edsanimate-blank-css' );
wp_add_inline_style( 'edsanimate-blank-css', $custom_css );
}
function edsanimate_handler( $attributes, $content = null ) {
$device_type = $this->detect_device();
$enable_smart_phone = get_option('eds_enable_on_phone');
$enable_tablet = get_option('eds_enable_on_tab');
$enable= ($device_type=='phone' && intval($enable_smart_phone))
|| ($device_type =='tablet' && intval($enable_tablet))
|| ($device_type =='computer');
if($enable):
extract( shortcode_atts( array(
'animation' => '',
'delay' => '',
'duration' => '',
'infinite_animation' =>'',
'animate_on' => '',
'scroll_offset' => ''
), $attributes ) );
$classString = "animated";
$animation = sanitize_text_field( $animation );
if($animation == '')
{
return do_shortcode($content);
}
$classString .= " " . $animation;
if(strcasecmp($infinite_animation, 'yes')==0) {
$classString .= " infinite";
}
if( $delay != '' ) {
$delay = intval( sanitize_text_field( $delay ) );
$classString .= " delay" . $delay;
}
if( $duration != '' ) {
$duration = intval( sanitize_text_field( $duration ) );
$classString .= " duration" . $duration;
} else {
$classString .= " duration2";
}
if(strcasecmp($animate_on, 'scroll')==0) {
$classString .= " eds-on-scroll";
} else if(strcasecmp($animate_on, 'click')==0) {
$classString .= " eds-on-click";
} else if(strcasecmp($animate_on, 'hover')==0) {
$classString .= " eds-on-hover";
}
if(isset($scroll_offset) && $scroll_offset!=''){
return '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; } function add_plugin_page_settings_link( $links ) { $links[] = '' . __('Settings', 'eds-animate' ) . ''; return $links; } /** * Check if Block Editor is active. * Must only be used after plugins_loaded action is fired. * * @return bool */ function is_gutenberg_active() { // Gutenberg plugin is installed and activated. $gutenberg = ! ( false === has_filter( 'replace_editor', 'gutenberg_init' ) ); // Block editor since 5.0. $block_editor = version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' ); if ( ! $gutenberg && ! $block_editor ) { return false; } if ( $this->is_classic_editor_plugin_active() ) { $editor_option = get_option( 'classic-editor-replace' ); $block_editor_active = array( 'no-replace', 'block' ); return in_array( $editor_option, $block_editor_active, true ); } return true; } /** * Check if Classic Editor plugin is active. * * @return bool */ function is_classic_editor_plugin_active() { if ( ! function_exists( 'is_plugin_active' ) ) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } if ( is_plugin_active( 'classic-editor/classic-editor.php' ) ) { return true; } return false; } function register_animateit_block() { if( !$this->is_gutenberg_active() ) { return; } // automatically load dependencies and version $asset_file = include( plugin_dir_path( __FILE__ ) . 'build/index.asset.php'); wp_register_script( 'edsanimate-block-script', plugins_url( 'build/index.js', __FILE__ ), $asset_file['dependencies'], $asset_file['version'] ); wp_register_style( 'edsanimate-block-editor-style', plugins_url( 'assets/css/block-editor.css', __FILE__ ), array( 'wp-edit-blocks' ), filemtime( plugin_dir_path( __FILE__ ) . 'assets/css/block-editor.css' ) ); wp_register_style( 'edsanimate-block-style', plugins_url( 'assets/css/block-style.css', __FILE__ ), array( ), filemtime( plugin_dir_path( __FILE__ ) . 'assets/css/block-style.css' ) ); register_block_type( 'eds/animate-it-block', array( 'style' => 'edsanimate-block-style', 'editor_style' => 'edsanimate-block-editor-style', 'editor_script' => 'edsanimate-block-script', ) ); if ( function_exists( 'wp_set_script_translations' ) ) { wp_set_script_translations( 'edsanimate-block-script', 'eds-animate', plugin_dir_path( __FILE__ ) . 'lang/' ); } } } if( !defined( 'WPINC' ) ) { die; } global $eds_animate_it_version; $eds_animate_it_version = '2.3.0'; new EDS_Animate( __FILE__ );