On this page
WP_MatchesMapRegex::apply( string $subject, array $matches ): string
Substitute substring matches in subject.
Description
static helper function to ease use
Parameters
$subjectstring Required-
subject
$matchesarray Required-
data used for substitution
Return
string
Source
File: wp-includes/class-wp-matchesmapregex.php. View all references
public static function apply( $subject, $matches ) {
$oSelf = new WP_MatchesMapRegex( $subject, $matches );
return $oSelf->output;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_MatchesMapRegex::__construct() wp-includes/class-wp-matchesmapregex.php | constructor |
Used By
| Used By | Description |
|---|---|
| WP::parse_request() wp-includes/class-wp.php | Parses the request to find the correct WordPress query. |
| url_to_postid() wp-includes/rewrite.php | Examines a URL and try to determine the post ID it represents. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_matchesmapregex/apply