'', 'parallaxspeed' => 1, 'height' => '',//used again as of 1.9.0 ignored if not set 'parallaxbg' => 'on', 'floater' => '', 'floatermedia' => '', 'floaterposition' => 'right', 'floaterdirection' => 'up', 'caption' => '', 'captionposition' => 'bottom-left', 'lightbox' => false, 'floaterdistance' => '', 'overlay_revealfx' => '', 'floaterspeed' => 1 // not used ); $atts = apply_filters( 'aesop_parallax_defaults', shortcode_atts( $defaults, $atts ) ); $floater_ratio =0; $floater_distance = 0; if ($atts['floaterdirection'] != 'none') { if (strpos($atts['floaterdistance'], '%') !== false) { $floater_ratio = floatval($atts['floaterdistance']) / 100; } else { $floater_distance = intval(str_replace('px', '', $atts['floaterdistance'])); } if ($floater_distance<=0 && $floater_ratio <=0) { $floater_ratio = 0.33; $floater_distance = 0; } } if (wp_is_mobile()) { $atts['parallaxbg'] = 'off'; } // let this be used multiple times static $instance = 0; $instance++; $unique = sprintf( '%s-%s', get_the_ID(), $instance ); // add a css class if parallax bg is set to on $laxclass = 'on' == $atts['parallaxbg'] ? 'is-parallax' : false; // add parallax and floater speed options $parallax_speed = intval($atts['parallaxspeed']); $floater_speed = $atts['floaterspeed']; if (empty($parallax_speed) || $parallax_speed <1) $parallax_speed =1; else if ($parallax_speed >6) $parallax_speed =6; // add custom css classes through our utility function $classes = aesop_component_classes( 'parallax', '' ); // automatically provide an alt tag for the image based on the name of the image file $auto_alt = $atts['img'] ? basename( $atts['img'] ) : null; $floater_direction = $atts['floaterdirection'] ? $atts['floaterdirection'] : 'up'; ob_start(); do_action( 'aesop_parallax_before', $atts, $unique ); // action $nowebkitxform = ('fixed' == $atts['parallaxbg']) ? '-webkit-transform: none;':''; ?>