Snoopy::_stripform()publicWP 1.0

Method of the class: Snoopy{}

No Hooks.

Return

null. Nothing.

Usage

$Snoopy = new Snoopy();
$Snoopy->_stripform( $document );
$document (required)
-

Snoopy::_stripform() code WP 6.1.1

function _stripform($document)
{
	preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);

	// catenate the matches
	$match = implode("\r\n",$elements[0]);

	// return the links
	return $match;
}