Used By
| Used By | Description |
|---|---|
| wp-includes/rewrite.php: remove_rewrite_tag() | Removes an existing rewrite tag (like %postname%). |
Removes an existing rewrite tag.
(string) (Required) Name of the rewrite tag to remove.
File: wp-includes/class-wp-rewrite.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 ] );
}
} | Version | Description |
|---|---|
| 4.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rewrite/remove_rewrite_tag