WP_Taxonomy::remove_rewrite_rules

Advertisement

Summery Summery

Removes any rewrite rules, permastructs, and rules for the taxonomy.

Syntax Syntax

WP_Taxonomy::remove_rewrite_rules()

Source Source

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

	/**
	 * Adds the necessary rewrite rules for the taxonomy.
	 *
	 * @since 4.7.0
	 *
	 * @global WP $wp Current WordPress environment instance.
	 */
	public function add_rewrite_rules() {
		/* @var WP $wp */
		global $wp;

		// Non-publicly queryable taxonomies should not register query vars, except in the admin.
		if ( false !== $this->query_var && $wp ) {
			$wp->add_query_var( $this->query_var );
		}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply