/**
* Reset the HTML document head data
*
* @param mixed $types type or types of the heads elements to reset
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 3.7.0
*/
public function resetHeadData($types = null)
{
if (\is_null($types)) {
$this->title = '';
$this->description = '';
$this->link = '';
$this->_metaTags = array();
$this->_links = array();
$this->_styleSheets = array();
$this->_style = array();
$this->_scripts = array();
$this->_script = array();
$this->_custom = array();
$this->scriptOptions = array();
}
if (\is_array($types)) {
foreach ($types as $type) {
$this->resetHeadDatum($type);
}
}
if (\is_string($types)) {
$this->resetHeadDatum($types);
}
return $this;
}