user_trailingslashit


user_trailingslashit ( $url, $type_of_url = '' )

Parameters:
  • (string) url URL with or without a trailing slash.
  • (string) type_of_url Optional. The type of URL being considered (e.g. single, category, etc) for use in the filter. Default empty string.
Returns:
  • (string) The URL with the trailing slash appended or stripped.
Defined at:

Description

Retrieves a trailing-slashed string if the site is set for adding trailing slashes.Conditionally adds a trailing slash if the permalink structure has a trailing slash, strips the trailing slash if not. The string is passed through the {@see 'user_trailingslashit'} filter. Will remove trailing slash from string, if site is not set to have them.

Related Functions

trailingslashit, untrailingslashit, set_transient, has_translation, get_user_details

Top Google Results

User discussions

wpseek mobile