wpseek.com
A WordPress-centric search engine for devs and theme authors



_wp_filter_taxonomy_base › WordPress Function

Since2.6.0
Deprecatedn/a
_wp_filter_taxonomy_base ( $base )
Access:
  • private
Parameters:
  • (string) $base The taxonomy base that we're going to filter
    Required: Yes
Returns:
  • (string)
Defined at:
Codex:

Filters the URL base for taxonomies.

To remove any manually prepended /index.php/.


Source

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