HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/shoetique/wp-content/themes/north-wp/vc_templates/thb_iconbox.php
<?php function thb_iconbox( $atts, $content = null ) {
    extract(shortcode_atts(array(
    	'type'			 => '',
       	'image'      => '',
       	'color'      => '',
       	'icon'			 => 'fa',
       	'icon_color' => false,
       	'content_color' => false,
       	'heading'		 => '',
       	'heading_color' => false,
       	'use_btn'				 => false,
       	'btn_color'      => '',
       	'btn_target_blank' => false,
       	'btn_link'       => '#',
       	'btn_size'			 => 'small',
       	'btn_icon'			 => false,
       	'btn_content'		 => false,
       	'btn_style'       => false,
       	'animation'	 => false
    ), $atts));
	$btn = '';
	
	// Image & Icon
	if ($image) {
		$img_id = preg_replace('/[^\d]/', '', $image);
		$img = wp_get_attachment_image($img_id, 'full', false, array(
			'alt'   => trim(strip_tags( get_post_meta($img_id, '_wp_attachment_image_alt', true) )),
		));
  } else {
  	$icon = '<i class="fa '.$icon.'"></i>';
  }
  
  // Button
  if ($use_btn) {
	  if($btn_icon) { $btn_content = '<span class="icon"><i class="fa '.$btn_icon.'"></i></span>'. $btn_content; }
	  
	  $btn = '<a class="btn '.$btn_color.' '.$btn_size.' '.$btn_style.'" href="'.$btn_link.'" ' . ($btn_target_blank ? ' target="_blank"' : '') .' role="button">' .$btn_content. '</a>';
	}

	// Content
	
	$out = '<div class="iconbox '.$type.' '.$animation.'">';

	$out .= '<span' . ($image ? ' class="img"' : '') .' ' . ($icon_color ? ' style="color: '.$icon_color.'"' : '') .'>' . ($image ? $img : $icon) .'</span>';

		
		
	$out .= '<div class="content">';
	
	
	$out .= '<h6' . ($heading_color ? ' style="color: '.$heading_color.'"' : '').'>'.$heading.'</h6>';
	$out .= '<div' . ($content_color ? ' style="color: '.$content_color.'"' : '').'>'.$content.'</div>';
	$out .= $btn;
	$out .= '</div>
	</div>';
  return $out;
}
add_shortcode('thb_iconbox', 'thb_iconbox');