<?php 
/**
 * $selectors = []
 */
function edumodo_parse_selector_as_string( $selectors = []){
	$parsed_selector = join(', ', $selectors);
	return $parsed_selector;
}
/**
 * $typography_arr = []
 * $selectors = ''
 */
function edumodo_parse_typography_to_selectors($typography_arr=[], $selectors=''){
    if( is_array($typography_arr) && count($typography_arr) < 1 ){
        return false;
    }
	$t_font_family = array_key_exists ('font-family', $typography_arr) ? $typography_arr['font-family'] : '';
	$t_variant = array_key_exists ('variant', $typography_arr) ? $typography_arr['variant'] : '';
	$t_color = array_key_exists ('color', $typography_arr) ? $typography_arr['color'] : '';
	$t_text_transform = array_key_exists ('text-transform', $typography_arr) ? $typography_arr['text-transform'] : '';
	$t_font_size = array_key_exists ('font-size', $typography_arr) ? $typography_arr['font-size'] : '';
	$t_line_height = array_key_exists ('line-height', $typography_arr) ? $typography_arr['line-height'] : '';
	$t_letter_spacing = array_key_exists ('letter-spacing', $typography_arr) ? $typography_arr['letter-spacing'] : '';
	$t_font_weight = array_key_exists ('font-weight', $typography_arr) ? $typography_arr['font-weight'] : '';
	$t_font_style = array_key_exists ('font-style', $typography_arr) ? $typography_arr['font-style'] : '';

	echo $selectors . '{'
		. 'font-family:' . $t_font_family . ';'
		. 'color:' . $t_color . ';'
		. 'text-transform:' . $t_text_transform . ';'
		. 'font-size:' . $t_font_size . ';'
		. 'line-height:' . $t_line_height . ';'
		. 'font-weight:' . $t_font_weight . ';'
		. 'font-style:' . $t_font_style . ';'
		. 'letter-spacing:' . $t_letter_spacing . ';'
		. '}';
}
function edumodo_typography_parser_without_font_family($typography_arr=[], $selectors=''){
    if( is_array($typography_arr) && count($typography_arr) < 1 ){
        return false;
    }
	$t_font_size = array_key_exists ('font-size', $typography_arr) ? $typography_arr['font-size'] : '';
	$t_line_height = array_key_exists ('line-height', $typography_arr) ? $typography_arr['line-height'] : '';
	$t_letter_spacing = array_key_exists ('letter-spacing', $typography_arr) ? $typography_arr['letter-spacing'] : '';
	$t_text_transform = array_key_exists ('text-transform', $typography_arr) ? $typography_arr['text-transform'] : '';
	$t_color = array_key_exists ('color', $typography_arr) ? $typography_arr['color'] : '';

	echo $selectors . '{'
		. 'font-size:' . $t_font_size . ';'
		. 'line-height:' . $t_line_height . ';'
		. 'letter-spacing:' . $t_letter_spacing . ';'
		. 'text-transform:' . $t_text_transform . ';'
		. 'color:' . $t_color . ';'
		. '}';
}
function edumodo_style_property_parser($selectors='', $property_attr = '', $property_value = ''){
	echo $selectors . '{'.
			$property_attr . ': '. $property_value . ' ;' 
		.'}';
}

?>