WordPress开发者和主题制作者的搜索引擎



_wp_filter_taxonomy_base ›

Since2.6.0
已弃用n/a
_wp_filter_taxonomy_base ( $base )
访问:
  • private
参数:
  • (string) $base The taxonomy base that we're going to filter
    Required: Yes
返回:
  • (string)
定义在:
文档:

Filters the URL base for taxonomies.

To remove any manually prepended /index.php/.



源码

function _wp_filter_taxonomy_base( $base ) {
	if ( ! empty( $base ) ) {
		$base = preg_replace( '|^/index\.php/|', '', $base );
		$base = trim( $base, '/' );
	}
	return $base;
}