_wp_filter_taxonomy_base()
Filters the URL base for taxonomies.
To remove any manually prepended /index.php/.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Return
String
.
Usage
_wp_filter_taxonomy_base( $base );
- $base(string) (required)
- The taxonomy base that we're going to filter
Changelog
Since 2.6.0 | Introduced. |
_wp_filter_taxonomy_base() wp filter taxonomy base code WP 6.7.1
function _wp_filter_taxonomy_base( $base ) { if ( ! empty( $base ) ) { $base = preg_replace( '|^/index\.php/|', '', $base ); $base = trim( $base, '/' ); } return $base; }