WordPress at a glance
function is not described

WP_Rewrite::remove_rewrite_tag() public WP 4.5.0

Removes an existing rewrite tag.

{} It's a method of the class: WP_Rewrite{}

No Hooks.

Return

Null. Nothing.

Usage

global $wp_rewrite;
$wp_rewrite->remove_rewrite_tag( $tag );
$tag(string) (required)
Name of the rewrite tag to remove.

Notes

  • See: WP_Rewrite::$rewritecode
  • See: WP_Rewrite::$rewritereplace
  • See: WP_Rewrite::$queryreplace

Changelog

Since 4.5.0 Introduced.

Code of WP_Rewrite::remove_rewrite_tag() WP 5.5.1

<?php
public function remove_rewrite_tag( $tag ) {
	$position = array_search( $tag, $this->rewritecode, true );
	if ( false !== $position && null !== $position ) {
		unset( $this->rewritecode[ $position ] );
		unset( $this->rewritereplace[ $position ] );
		unset( $this->queryreplace[ $position ] );
	}
}