remove_permastruct() WordPress Function

The remove_permastruct() function is used to remove any permastructs that have been added to the WordPress site. This function is typically used when changing the permalink structure of the site.

remove_permastruct( string $name ) #

Removes a permalink structure.


Description

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

Top ↑

See also


Top ↑

Parameters

$name

(string)(Required)Name for permalink structure.


Top ↑

Source

File: wp-includes/rewrite.php

function remove_permastruct( $name ) {
	global $wp_rewrite;

	$wp_rewrite->remove_permastruct( $name );
}


Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.