删除永久链接结构。
原型
remove_permastruct( string $name )
描述
只能用于删除使用add_permastruct()添加的permastructs。内置的permastructs无法删除。
参考:
- WP_Rewrite::remove_permastruct()
参数
$name
(string)
(Required)
永久链接结构的名称。
源文件
路径:wp-includes/rewrite.php
<?php
...
function remove_permastruct( $name ) {
global $wp_rewrite;
$wp_rewrite->remove_permastruct( $name );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/remove_permastruct/