Snoopy::_stripform
Method of the class: Snoopy{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Snoopy = new Snoopy(); $Snoopy->_stripform( $document );
- $document(required)
- .
Snoopy::_stripform() Snoopy:: stripform code WP 6.9.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;
}