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
Parameters
- $subject
(string)(Required)subject
- $matches
(array)(Required)data used for substitution
Return
(string)
Source
File: wp-includes/class-wp-matchesmapregex.php
public static function apply( $subject, $matches ) { $oSelf = new WP_MatchesMapRegex( $subject, $matches ); return $oSelf->output; }
Expand full source codeCollapse full source codeView on TracView on GitHub