Classes_Prop_Type::make()->default( [] ), 'svg' => Image_Src_Prop_Type::make()->default_url( static::DEFAULT_SVG_URL ), 'link' => Link_Prop_Type::make(), ]; if ( Plugin::$instance->experiments->is_feature_active( Module::EXPERIMENT_VERSION_3_30 ) ) { $props['_cssid'] = String_Prop_Type::make(); } return $props; } protected function define_atomic_controls(): array { $settings_section_items = [ Link_Control::bind_to( 'link' )->set_label( __( 'Link', 'elementor' ) ), ]; if ( Plugin::$instance->experiments->is_feature_active( Module::EXPERIMENT_VERSION_3_30 ) ) { $settings_section_items[] = Text_Control::bind_to( '_cssid' )->set_label( __( 'ID', 'elementor' ) )->set_meta( [ 'layout' => 'two-columns', 'topDivider' => true, ] ); } return [ Section::make() ->set_label( esc_html__( 'Content', 'elementor' ) ) ->set_items( [ Svg_Control::bind_to( 'svg' ), ] ), Section::make() ->set_label( esc_html__( 'Settings', 'elementor' ) ) ->set_items( $settings_section_items ), ]; } protected function define_base_styles(): array { $display_value = String_Prop_Type::generate( 'inline-block' ); $size = Size_Prop_Type::generate( [ 'size' => 65, 'unit' => 'px', ] ); return [ self::BASE_STYLE_KEY => Style_Definition::make() ->add_variant( Style_Variant::make() ->add_prop( 'display', $display_value ) ->add_prop( 'width', $size ) ->add_prop( 'height', $size ) ), ]; } protected function render() { $settings = $this->get_atomic_settings(); $svg = $this->get_svg_content( $settings ); if ( ! $svg ) { return; } $svg = new \WP_HTML_Tag_Processor( $svg ); if ( ! $svg->next_tag( 'svg' ) ) { return; } $svg->set_attribute( 'fill', 'currentColor' ); $this->add_svg_style( $svg, 'width: 100%; height: 100%; overflow: unset;' ); $svg_html = ( new Svg_Sanitizer() )->sanitize( $svg->get_updated_html() ); $classes = array_filter( array_merge( [ self::BASE_STYLE_KEY => $this->get_base_styles_dictionary()[ self::BASE_STYLE_KEY ] ], $settings['classes'] ) ); $classes_string = implode( ' ', $classes ); $cssid_attribute = ! empty( $settings['_cssid'] ) ? 'id="' . esc_attr( $settings['_cssid'] ) . '"' : ''; if ( isset( $settings['link'] ) && ! empty( $settings['link']['href'] ) ) { $svg_html = sprintf( '%s', $settings['link']['href'], esc_attr( $settings['link']['target'] ), esc_attr( $classes_string ), $cssid_attribute, $svg_html ); } else { $svg_html = sprintf( '