remove_permastruct

Removes a permalink structure.

Description

remove_permastruct( (string) $name ); 

Can only be used to remove permastructs that were added using add_permastruct(). Built-in permastructs cannot be removed.

Parameters (1)

0. $name (string)
Name for permalink structure.

Usage

  1. if ( !function_exists( 'remove_permastruct' ) ) { 
  2. require_once ABSPATH . WPINC . '/rewrite.php'; 
  3.  
  4. // Name for permalink structure. 
  5. $name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = remove_permastruct($name); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/rewrite.php  
  1. function remove_permastruct( $name ) { 
  2. global $wp_rewrite; 
  3.  
  4. $wp_rewrite->remove_permastruct( $name );