ayout']}", $atts['hotspot_tooltip_display'] ) ); if( $atts['animation'] != 'no-animation' ) { $element_styling->add_classes( 'container', array( 'avia_animated_image', 'avia_animate_when_almost_visible', $atts['animation'] ) ); } if( ! empty( $atts['hotspot_mobile'] ) ) { $element_styling->add_classes( 'container', 'av-mobile-fallback-active' ); } } $selectors = array( 'container' => ".av-hotspot-image-container.{$element_id}" ); $element_styling->add_selectors( $selectors ); $result['default'] = $default; $result['atts'] = $atts; $result['content'] = $content; $result['element_styling'] = $element_styling; $result['meta'] = $meta; return $result; } /** * Create custom stylings for items * (also called when creating header implicit) * * @since 4.8.4 * @param array $args * @return array */ protected function get_element_styles_item( array $args ) { $result = parent::get_element_styles_item( $args ); extract( $result ); /** * Fix a bug in 4.7 and 4.7.1 renaming option id (no longer backwards comp.) - can be removed in a future version again */ if( isset( $atts['linktarget'] ) ) { $atts['link_target'] = $atts['linktarget']; } $default = array( 'tooltip_width' => 'av-tt-default-width', 'tooltip_pos' => 'av-tt-pos-above av-tt-align-left', 'hotspot_pos' => '50,50', 'output' => '', 'hotspot_color' => '', 'custom_bg' => '', 'custom_font' => '', 'custom_pulse' => '', 'tooltip_style' => 'main_color', 'link' => '', 'link_target' => '' ); $default = $this->sync_sc_defaults_array( $default, 'modal_item', 'no_content' ); $atts = shortcode_atts( $default, $atts, $this->config['shortcode_nested'][0] ); // hidden, set in editor if( empty( $atts['hotspot_pos'] ) ) { $atts['hotspot_pos'] = '50,50'; } $classes = array( 'av-image-hotspot', $element_id ); $element_styling->add_classes( 'container', $classes ); $hotspot_pos = explode( ',', $atts['hotspot_pos'] ); $element_styling->add_styles( 'container', array( 'top' => $hotspot_pos[0] . '%', 'left' => $hotspot_pos[1] . '%' ) ); if( 'custom' == $atts['hotspot_color'] ) { $element_styling->add_styles( 'container-inner', array( 'background-color' => $atts['custom_bg'], 'color' => $atts['custom_font'] ) ); $element_styling->add_styles( 'container-pulse', array( 'background-color' => $atts['custom_pulse'] ) ); } $selectors = array( 'container' => ".av-hotspot-image-container .av-image-hotspot.{$element_id}", 'container-inner' => ".av-hotspot-image-container .av-image-hotspot.{$element_id} .av-image-hotspot_inner", 'container-pulse' => ".av-hotspot-image-container .av-image-hotspot.{$element_id} .av-image-hotspot-pulse", ); $element_styling->add_selectors( $selectors ); $result['default'] = $default; $result['atts'] = $atts; $result['content'] = $content; $result['element_styling'] = $element_styling; return $result; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ function shortcode_handler( $atts, $content = '', $shortcodename = '', $meta = '' ) { $result = $this->get_element_styles( compact( array( 'atts', 'content', 'shortcodename', 'meta' ) ) ); extract( $result ); extract( AviaHelper::av_mobile_sizes( $atts ) ); //return $av_font_classes, $av_title_font_classes and $av_display_classes extract( $atts ); if( 'disabled' == $atts['img_scrset'] ) { Av_Responsive_Images()->force_disable( 'disabled' ); } avia_sc_image_hotspots::$img_hotspot_count ++; $output = ''; //no src? return if( ! empty( $src ) ) { $extra_class = ! ShortcodeHelper::is_top_level() ? ' av-non-fullwidth-hotspot-image' : ''; $hotspot_html = ''; $tooltip_html = ''; $counter = 1; foreach( $hotspots as $hotspot ) { if( ! empty( $hotspot_mobile ) ) { $tooltip_html .= $this->add_fallback_tooltip( $hotspot, $counter, $hotspot_tooltip_display ); } $extraClass = ! empty( $hotspot_mobile ) ? ' av-mobile-fallback-active ' : ''; $extraClass .= ! empty( $hotspot_tooltip_display ) ? " {$hotspot_tooltip_display}-single " : ''; $hotspot_html .= $this->add_hotspot( $hotspot, $counter, $extraClass, $hotspot_tooltip_display ); $counter ++; } $hw = ''; if( ! empty( $img_h ) ) { $hw .= ' height="' . $img_h . '"'; } if( ! empty( $img_w ) ) { $hw .= ' width="' . $img_w . '"'; } $markup_img = avia_markup_helper( array( 'context' => 'image', 'echo' => false, 'custom_markup' => $meta['custom_markup'] ) ); $markup_url = avia_markup_helper( array( 'context' => 'image_url', 'echo' => false, 'custom_markup' => $meta['custom_markup'] ) ); $el_id = ShortcodeHelper::is_top_level() ? '' : $meta['custom_el_id']; $img_tag = "{$img_alt}"; $img_tag = Av_Responsive_Images()->prepare_single_image( $img_tag, $attachment_id, $lazy_loading ); $style_tag = $element_styling->get_style_tag( $element_id ); $item_tag = $element_styling->style_tag_html( $this->subitem_inline_styles, 'sub-' . $element_id ); $container_class = $element_styling->get_class_string( 'container' ); $output .= $style_tag; $output .= $item_tag; $output .= "
"; $output .= "
"; $output .= "
"; $output .= "
"; $output .= $hotspot_html; $output .= $img_tag; $output .= '
'; $output .= '
'; $output .= '
'; $output .= $tooltip_html; $output .= '
'; } $output = Av_Responsive_Images()->make_content_images_responsive( $output ); Av_Responsive_Images()->force_disable( 'reset' ); $this->subitem_inline_styles = ''; if( ! ShortcodeHelper::is_top_level() ) { return $output; } $skipSecond = false; $params['class'] = "main_color av-fullwidth-hotspots {$meta['el_class']} {$av_display_classes}"; $params['open_structure'] = false; $params['id'] = AviaHelper::save_string( $meta['custom_id_val'] , '-', 'av-sc-img-hotspot-' . avia_sc_image_hotspots::$img_hotspot_count ); $params['custom_markup'] = $meta['custom_markup']; //we don't need a closing structure if the element is the first one or if a previous fullwidth element was displayed before if( $meta['index'] == 0 ) { $params['close'] = false; } if( ! empty( $meta['siblings']['prev']['tag'] ) && in_array( $meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section ) ) { $params['close'] = false; } $section = avia_new_section( $params ); $section .= $output; $section .= ''; //close section //if the next tag is a section dont create a new section from this shortcode if( ! empty( $meta['siblings']['next']['tag'] ) && in_array( $meta['siblings']['next']['tag'], AviaBuilder::$full_el ) ) { $skipSecond = true; } //if there is no next element dont create a new section. if( empty( $meta['siblings']['next']['tag'] ) ) { $skipSecond = true; } if( empty( $skipSecond ) ) { $section .= avia_new_section( array( 'close' => false, 'id' => 'after_image_hotspots' ) ); } return $section; } /** * * @since < 4.0 * @param array $hotspot * @param int $counter * @param string $extraClass * @param string $hotspot_tooltip_display * @return string */ protected function add_hotspot( array $hotspot, $counter, $extraClass = '', $hotspot_tooltip_display = '' ) { // init parameters for normal shortcode handler $atts = $hotspot['attr']; $content = $hotspot['content']; $shortcodename = $this->config['shortcode_nested'][0]; $result = $this->get_element_styles_item( compact( array( 'atts', 'content', 'shortcodename' ) ) ); extract( $result ); extract( $atts ); // prepare content for data attribute $content = esc_attr( ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $content ) ) ); $tags = array( 'div', 'div' ); if( ! empty( $link ) ) { $link = AviaHelper::get_url( $link, false ); $blank = AviaHelper::get_link_target( $link_target ); $tags = array( "a href={$link} {$blank}", 'a' ); } $layout = explode( ' ', $tooltip_pos ); $data_pos = isset( $layout[0] ) ? str_replace( 'av-tt-pos-', '', $layout[0] ) : 'top'; $data_align = isset( $layout[1] ) ? str_replace( 'av-tt-align-', '', $layout[1] ) : 'centered'; switch( $data_pos ) { case 'above': $data_pos = 'top'; break; case 'below': $data_pos = 'bottom'; break; } $this->subitem_inline_styles .= $element_styling->get_style_tag( $element_id, 'rules_only' ); $container_class = $element_styling->get_class_string( 'container' ); $output .= "
"; $output .= "<{$tags[0]} class='av-image-hotspot_inner'>{$counter}"; $output .= "
"; $output .= '
'; return $output; } /** * * @param array $hotspot * @param int $counter * @param string $hotspot_tooltip_display * @return string */ protected function add_fallback_tooltip( $hotspot, $counter, $hotspot_tooltip_display = '' ) { $content = $hotspot['content']; if( empty( $content ) ) { return; } $output = ''; $output .= "
"; $output .= '
'; $output .= $counter; $output .= '
'; $output .= '
'; $output .= '
'; $output .= ShortcodeHelper::avia_apply_autop( $content ); $output .= '
'; $output .= '
'; return $output; } } } 1.0Stichting Collot Zien en Belevenhttps://www.collotzienenbeleven.nlStichting Collot Zien en Belevenhttps://www.collotzienenbeleven.nlCasino Zuidrich600338<blockquote class="wp-embedded-content" data-secret="dHbqOIrFJ3"><a href="https://www.collotzienenbeleven.nl/casino-zuid/">Casino Zuid</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://www.collotzienenbeleven.nl/casino-zuid/embed/#?secret=dHbqOIrFJ3" width="600" height="338" title="“Casino Zuid” — Stichting Collot Zien en Beleven" data-secret="dHbqOIrFJ3" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script type="text/javascript"> /* <![CDATA[ */ /*! This file is auto-generated */ !function(d,l){"use strict";l.querySelector&&d.addEventListener&&"undefined"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i<o.length;i++)o[i].style.display="none";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute("style"),"height"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):"link"===t.message&&(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document); /* ]]> */ </script>