<?php

function construction_icon($atts, $content = null){

	extract(shortcode_atts(array(
		'name'			=>	'',
		'size'			=>	'',
	), $atts));

	ob_start();

	if( !empty($size) ){
		$style = ' font-size:' . esc_attr($size). ';';
	} else {
		$style = '';
	}
	
	echo '<i class="'. esc_attr($name) .'" style="'.esc_attr($style).'"></i>';
	
	$output = ob_get_contents();
        
    ob_end_clean();

    return $output;
}

add_shortcode('icon','construction_icon');

?>