WP_MatchesMapRegex::apply() WordPress Method

The WP_MatchesMapRegex::apply() method is used to apply a regular expression to a given string and return an array of matches.

WP_MatchesMapRegex::apply( string $subject, array $matches ) #

Substitute substring matches in subject.


Description

static helper function to ease use


Top ↑

Parameters

$subject

(string)(Required)subject

$matches

(array)(Required)data used for substitution


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/class-wp-matchesmapregex.php

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.