<?php

/***************************************** for Upload Field ****************************************************************************/
		//var_dump($field->type);
		if( $field->type === 'fileupload' || $field->type === 'post_image'){

			// Add classes to the main field label
			$labels = $dom->getElementsByTagName('label');

			// foreach( $labels as $label ) {
			// 	$label_classes = $label->getAttribute( 'class' );

			// 	if ( strpos( $label_classes, 'gfield_label' ) !== false ) {
			// 		$add_label_classes = ' mdc-floating-label mdc-floating-label--float-above stla-mat-top-label';
			// 		$label->setAttribute( 'class',	$label->getAttribute( 'class' ) . $add_label_classes );
			// 	}
			// }
			
			$inputs = $dom->getElementsByTagName('input');
			foreach($inputs as $input) {
				$input_type = $input->getAttribute('type');
				if( $input_type === 'file'|| $input_type === 'button'){
					$input->setAttribute('class', $input->getAttribute('class').' mdc-button mdc-button--raised ');
				}				
			}	
			$content = utf8_decode($dom->saveHTML($dom->documentElement));
		}

	