WP_Rewrite::remove_rewrite_tag( string $tag )

Removes an existing rewrite tag.


Description Description

See also See also

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

Top ↑

Parameters Parameters

$tag

(string) (Required) Name of the rewrite tag to remove.


Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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