/** * 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 = '
%2$s
', $this->parent->get_render_attribute_string( 'description_text' ), $settings['description_text'] ); } $html .= '