wp-includes/class-wp-url-pattern-prefixer.php:132Escapes a string for use in a URL pattern component.
$strstringstring private static function escape_pattern_string( string $str ): string { return addcslashes( $str, '+*?:{}()\\' ); }Introduced in 6.8.0. Unchanged from 6.8.8 through 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.
src/wp-includes/class-wp-url-pattern-prefixer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.