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

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


Description Description


Parameters Parameters

$regex

(string) (Required) Regular expression to match request against.

$query

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


Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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