过滤分类法的URL基础。
原型
_wp_filter_taxonomy_base( string $base )
描述
删除任何手动前置的/index.php/。
参数
$base
(string)
(Required)
我们要过滤的分类标准库
返回值
(string)
源文件
路径:wp-includes/rewrite.php
<?php
...
function _wp_filter_taxonomy_base( $base ) {
if ( !empty( $base ) ) {
$base = preg_replace( '|^/index.php/|', '', $base );
$base = trim( $base, '/' );
}
return $base;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/_wp_filter_taxonomy_base/