On this page
apply_filters( 'user_trailingslashit', string $string, string $type_of_url )
Filters the trailing-slashed string, depending on whether the site is set to use trailing slashes.
Parameters
$stringstring-
URL with or without a trailing slash.
$type_of_urlstring-
The type of URL being considered. Accepts
'single','single_trackback','single_feed','single_paged','commentpaged','paged','home','feed','category','page','year','month','day','post_type_archive'.
Source
File: wp-includes/link-template.php. View all references
return apply_filters( 'user_trailingslashit', $string, $type_of_url );
Related
Used By
| Used By | Description |
|---|---|
| user_trailingslashit() wp-includes/link-template.php | Retrieves a trailing-slashed string if the site is set for adding trailing slashes. |
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/user_trailingslashit