WordPress at a glance
function is not described

Snoopy::_striplinks() public WP 1.0

{} It's a method of the class: Snoopy{}

No Hooks.

Return

null. Null. Nothing.

Usage

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

Code of Snoopy::_striplinks() WP 5.7.1

<?php
function _striplinks($document)
{
	preg_match_all("'<\s*a\s.*?href\s*=\s*			# find <a href=
					([\"\'])?					# find single or double quote
					(?(1) (.*?)\\1 | ([^\s\>]+))		# if quote found, match up to next matching
												# quote, otherwise match up to next space
					'isx",$document,$links);


	// catenate the non-empty matches from the conditional subpattern

	foreach ( $links[2] as $key => $val )
	{
		if(!empty($val))
			$match[] = $val;
	}

	foreach ( $links[3] as $key => $val )
	{
		if(!empty($val))
			$match[] = $val;
	}

	// return the links
	return $match;
}