# autoptimize/0.8/classes/autoptimizeHTML.php

Autoptimize, version 0.8. 40 lines.

- Page: https://pluginprobe.com/plugins/autoptimize/0.8/code/classes/autoptimizeHTML.php
- Raw: https://pluginprobe.com/plugins/autoptimize/0.8/raw/classes/autoptimizeHTML.php
- Modified: 2009-07-23T01:55:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/autoptimize/0.8/code/classes/autoptimizeHTML.php#L10-L20`.

```php
<?php

class autoptimizeHTML extends autoptimizeBase
{
	
	//Does nothing
	public function read($justhead)
	{
		//Nothing to read for HTML
		return true;
	}
	
	//Joins and optimizes CSS
	public function minify()
	{
		if(class_exists('Minify_HTML'))
		{
			//Remove whitespace
			$this->content = Minify_HTML::minify($this->content);
			return true;
		}
		
		//Didn't minify :(
		return false;
	}
	
	//Does nothing
	public function cache()
	{
		//No cache for HTML
		return true;
	}
	
	//Returns the content
	public function getcontent()
	{
		return $this->content;
	}
}

```
