web/wp-content/plugins/caldera-forms/classes/email/attachment.php
/**
	 * Called when setting content property, and sets everything if value is a filepath
	 * 
	 * @since 1.4.0
	 * 
	 * @param $content
	 */
Called when setting content property, and sets everything if value is a filepath



@param $content
Called when setting content property and sets everything if value is a filepath @param $content
protected function content_set( $content ){
		if( is_file( $content ) ){
			$this->content = file_get_contents( $content );
			$this->filename = $content;
			$this->type = mime_content_type( $content );
			$info = pathinfo( $this->filename );
			if( 'csv' == $info[ 'extension' ] ){
				$this->type = 'text/csv';
			}
		}else{
			$this->content = $content;
		}
	}
protected function content_set ( $ content ) { if ( is_file ( $ content ) ) { $ this -> content = file_get_contents ( $ content ) ; $ this -> filename = $ content ; $ this -> type = mime_content_type ( $ content ) ; $ info = pathinfo ( $ this -> filename ) ; if ( 'csv' == $ info [ 'extension' ] ) { $ this -> type = 'text/csv' ; } } else { $ this -> content = $ content ; } }
Called when setting content property, and sets everything if value is a filepath
Called when setting content property and sets everything if value is a filepath