WP_MatchesMapRegex::applypublic staticWP 1.0

Substitute substring matches in subject.

static helper function to ease use

Method of the class: WP_MatchesMapRegex{}

No Hooks.

Returns

String.

Usage

$result = WP_MatchesMapRegex::apply( $subject, $matches );
$subject(string) (required)
subject.
$matches(array) (required)
data used for substitution.

WP_MatchesMapRegex::apply() code WP 6.8.3

public static function apply( $subject, $matches ) {
	$result = new WP_MatchesMapRegex( $subject, $matches );
	return $result->output;
}