_wp_filter_taxonomy_base

Advertisement

Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Summery Summery

Filters the URL base for taxonomies.

Syntax Syntax

_wp_filter_taxonomy_base( string $base )

Description Description

To remove any manually prepended /index.php/.

Parameters Parameters

$base

(string) (Required) The taxonomy base that we're going to filter

Return Return

(string)

Source Source

File: wp-includes/rewrite.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.