WordPress at a glance

remove_rewrite_tag() WP 1.0

Removes an existing rewrite tag (like %postname%).

Works based on: WP_Rewrite()
1 time — 0.00002 sec (very fast) | 50000 times — 0.07 sec (speed of light) | PHP 7.0.5, WP 4.5

No Hooks.

Return

null. Nothing.

Usage

remove_rewrite_tag( $tag );
$tag(string) (required)
Name of the rewrite tag.

Notes

  • Global. WP_Rewrite. $wp_rewrite WordPress rewrite component.

Changelog

Since 4.5.0 Introduced.

Code of remove_rewrite_tag() WP 5.7.2

<?php
function remove_rewrite_tag( $tag ) {
	global $wp_rewrite;
	$wp_rewrite->remove_rewrite_tag( $tag );
}

From tag: Rewrite (clean friendly URL)

No comments
    Log In