HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /home/xedaptot/public_html/wp-content/plugins/kingcomposer/shortcodes/kc_dropcaps.php
<?php
$desc = $custom_class = '';

$wrap_class	= apply_filters( 'kc-el-class', $atts );

extract( $atts );

$wrap_class[] = 'kc-dropcaps';

if ( !empty( $custom_class ) )
	$wrap_class[] = $custom_class;

$check = trim(strip_tags($desc));

if(  !empty( $check ) ){
	$ch = mb_substr($check, 0,1);
	$pos = strpos($desc, $ch);
	$str_re = '<span class="dropcaps-text">' . $ch .'</span>';
	$desc = substr_replace($desc, $str_re, $pos, $pos+1);
}
else
	$desc = __('Dropcap: Text not found', 'kingcomposer');


?>
<div class="<?php echo esc_attr( implode( " ", $wrap_class) ); ?>">
	<?php echo $desc; ?>
</div>