'off', 'img' => '', 'imgwidth' => '100%', 'imgheight' => '', 'offset' => '', 'alt' => '', 'align' => 'left', 'caption' => '', 'credit' => '', 'captionposition' => 'left', 'lightbox' => 'off', 'force_fullwidth' => 'off', 'overlay_content' => '', 'revealfx' => '', 'overlay_revealfx' => '' ); $atts = apply_filters( 'aesop_image_defaults', shortcode_atts( $defaults, $atts ) ); $panorama = $atts['panorama'] == "on"; $imgheight = 0; if ($panorama) { // panorama mode is on wp_enqueue_script( 'aesop-paver', AI_CORE_URL.'/public/assets/js/jquery.paver.min.js', array( 'ai-core' ) ); $atts['imgwidth'] ="100%"; if (empty($atts['imgheight'])) { list($width, $height, $type, $attr) = getimagesize($atts['img']); if (empty($height)) { $imgheight = "500px"; } else { $imgheight = $height."px"; } } else { $imgheight = aesop_size_string_parse($atts['imgheight'], "500px"); } //$image_id = aesop_get_image_id($atts['img']); add_action( 'wp_footer', aesop_panorama, 20 ); } // offset styles $offsetstyle = $atts['offset'] && ( 'left' == $atts['align'] || 'right' == $atts['align'] ) ? sprintf( 'style=margin-%s:%s;width:%s;', $atts['align'], $atts['offset'], $atts['imgwidth'] ) : 'style=max-width:'.$atts['imgwidth'].';'; // custom classes $classes = function_exists( 'aesop_component_classes' ) ? aesop_component_classes( 'image', '' ) : null; // let this be used multiple times static $instance = 0; $instance++; $unique = sprintf( '%s-%s', get_the_ID(), $instance ); // lazy loader class $lazy_holder = AI_CORE_URL.'/public/assets/img/aesop-lazy-holder.png'; $lazy = class_exists( 'AesopLazyLoader' ) && ! is_user_logged_in() ? sprintf( 'src="%s" data-src="%s" class="aesop-lazy-img"', $lazy_holder, esc_url( $atts['img'] ) ) : sprintf( 'src="%s"', esc_url( $atts['img'] ) ); // automatic alt tag fallback if none specified $auto_alt = $atts['img'] ? basename( $atts['img'] ) : null; $alt = $atts['alt'] ? $atts['alt'] : preg_replace( '/\\.[^.\\s]{3,4}$/', '', $auto_alt ); // combine into component shell ob_start(); do_action( 'aesop_image_before', $atts, $unique ); // action // hide the component initially if revealfx is set ?>