WP_Rewrite::add_external_rule( string $regex, string $query )

In this article

Adds a rewrite rule that doesn’t correspond to index.php.

Parameters

$regexstringrequired
Regular expression to match request against.
$querystringrequired
The corresponding query vars for this rewrite rule.

Source

public function add_external_rule( $regex, $query ) {
	$this->non_wp_rules[ $regex ] = $query;
}

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.