Core Function
View Source on Trac ↗ user_trailingslashit()
user_trailingslashit( mixed $url, mixed $type_of_url = '' ) Retrieves a trailing-slashed string if the site is set for adding trailing slashes.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $url string | URL with or without a trailing slash. Required |
| string | $type_of_url Optional. The type of URL being considered (e.g. single, category, etc) for use in the filter. Default empty string. Required |
Return Value
(string)
The URL with the trailing slash appended or stripped.
Function Information
Since Version
2.2.0
Source File
wp-includes/link-template.php
Advertisement