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

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


Parameters

$regex

(Required) Regular expression to match request against.

$query

(Required) The corresponding query vars for this rewrite rule.


Source

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

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


Changelog

Changelog
Version Description
WP-2.1.0 Introduced.