/** * Skin for the Image-Icon box module */ class Airi_Image_Icon_Box_Skin extends Elementor\Skin_Base { public function __construct( Elementor\Widget_Base $parent ) { parent::__construct( $parent ); add_action( 'elementor/element/athemes-image-icon-box/section_style_content/after_section_start', [ $this, 'register_controls' ] ); } public function get_id() { return 'airi_image_icon_skin'; } public function get_title() { return __( 'List style', 'airi' ); } public function register_controls( $controls ) { $controls->add_control( 'general_color', [ 'label' => __( 'General color', 'airi' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#f89121', 'condition' => [ '_skin' => $this->get_id(), ], 'selectors' => [ '{{WRAPPER}} .icon-wrapper i' => 'color: {{VALUE}};', '{{WRAPPER}}:hover .icon-wrapper i' => 'color: #fff;', '{{WRAPPER}}:hover .icon-wrapper' => 'background-color: {{VALUE}};', '{{WRAPPER}}:hover .icon-wrapper::after' => 'border-left-color: {{VALUE}};', ], ] ); } public function render() { $settings = $this->parent->get_settings(); $has_content = ! empty( $settings['title_text'] ) || ! empty( $settings['description_text'] ); $html = '
'; if ( ! empty( $settings['link']['url'] ) ) { $this->add_render_attribute( 'link', 'href', $settings['link']['url'] ); if ( $settings['link']['is_external'] ) { $this->add_render_attribute( 'link', 'target', '_blank' ); } if ( ! empty( $settings['link']['nofollow'] ) ) { $this->add_render_attribute( 'link', 'rel', 'nofollow' ); } } $html .= ''; if ( $has_content ) { $html .= '
'; if ( ! empty( $settings['title_text'] ) ) { $this->parent->add_render_attribute( 'title_text', 'class', 'elementor-image-box-title' ); $title_html = $settings['title_text']; if ( ! empty( $settings['link']['url'] ) ) { $title_html = 'get_render_attribute_string( 'link' ) . '>' . $title_html . ''; } $html .= sprintf( '<%1$s %2$s>%3$s', $settings['title_size'], $this->parent->get_render_attribute_string( 'title_text' ), $title_html ); } if ( ! empty( $settings['description_text'] ) ) { $this->parent->add_render_attribute( 'description_text', 'class', 'elementor-image-box-description' ); $html .= sprintf( '

%2$s

', $this->parent->get_render_attribute_string( 'description_text' ), $settings['description_text'] ); } $html .= '
'; } $html .= '
'; echo $html; } } add_action( 'elementor/widget/athemes-image-icon-box/skins_init', function( $widget ) { $widget->add_skin( new Airi_Image_Icon_Box_Skin( $widget ) ); } ); 1.0Socialinsidershttps://socialinsiders.net/dePhilhttps://socialinsiders.net/de/author/philHomerich600338<blockquote class="wp-embedded-content" data-secret="c46ZBmr9Bx"><a href="https://socialinsiders.net/de/">Home</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://socialinsiders.net/de/embed#?secret=c46ZBmr9Bx" width="600" height="338" title="„Home“ — Socialinsiders" data-secret="c46ZBmr9Bx" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script type="text/javascript"> /*! This file is auto-generated */ !function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c<n.length;c++)n[c].style.display="none";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute("style"),"height"===t.message){if(1e3<(i=parseInt(t.value,10)))i=1e3;else if(~~i<200)i=200;r.height=i}if("link"===t.message)if(a=l.createElement("a"),i=l.createElement("a"),a.href=r.getAttribute("src"),i.href=t.value,o.test(i.protocol))if(i.host===a.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",t,!1),d.addEventListener("load",t,!1);function t(){if(!o){o=!0;for(var e,t,r,a=-1!==navigator.appVersion.indexOf("MSIE 10"),i=!!navigator.userAgent.match(/Trident.*rv:11\./),s=l.querySelectorAll("iframe.wp-embedded-content"),n=0;n<s.length;n++){if(!(r=(t=s[n]).getAttribute("data-secret")))r=Math.random().toString(36).substr(2,10),t.src+="#?secret="+r,t.setAttribute("data-secret",r);if(a||i)(e=t.cloneNode(!0)).removeAttribute("security"),t.parentNode.replaceChild(e,t);t.contentWindow.postMessage({message:"ready",secret:r},"*")}}}}(window,document); </script>