• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress core a2z

WordPress core a2z

WordPress core only

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / WP_Taxonomy::remove_rewrite_rules() – Removes any rewrite rules, permastructs, and rules for the taxonomy.

You appear to be a bot. Output may be restricted

Description

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

Usage

WP_Taxonomy::remove_rewrite_rules();

Parameters

Returns

void

Source

File name: wordpress/wp-includes/class-wp-taxonomy.php
Lines:

1 to 15 of 15
  public function remove_rewrite_rules() {
    /* @var WP $wp */
    global $wp;

    // Remove query var.
    if ( false !== $this->query_var ) {
      $wp->remove_query_var( $this->query_var );
    }

    // Remove rewrite tags and permastructs.
    if ( false !== $this->rewrite ) {
      remove_rewrite_tag( "%$this->name%" );
      remove_permastruct( $this->name );
    }
  }
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Function name: WP_Taxonomy::remove_rewrite_rules
Class ref: WP_Taxonomy
Plugin ref: WordPress
Version: 5.6.2
Sourcefile: wp-includes/class-wp-taxonomy.php
File ref: wp-includes/class-wp-taxonomy.php
Deprecated?: No
API Letters: R,T,W

Footer

WP-a2z
WordPress core a2z
WordPress core only
WordPress 5.6.2
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  core.wp-a2z.org
© Copyright WP-a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites