<?php
	add_shortcode('spacer', 'spacer_handler');

	function spacer_handler($atts, $content=null, $code="") {
	
		if( $atts['color'] ) {
			$color = $atts['color'];
			$style = "style=\"background-color:".$color.";\"";
		} else { 
			$style = ""; 
		}
			
		if($atts['style'] == 'title') {
			return '<div class="spacer-title" '.$style.'>&nbsp;</div>';
		} elseif($atts['style'] == 'dotted') {
			return '<div class="spacer-dotted" '.$style.'>&nbsp;</div>';
		} elseif($atts['style'] == 'solid') {
			return '<div class="spacer-solid" '.$style.'>&nbsp;</div>';
		} elseif($atts['style'] == 'star') {
			return '<div class="spacer-star" '.$style.'>&nbsp;</div>';
		} else {
			return '<div class="spacer-title">&nbsp;</div>';
		}
	}
?>