user_trailingslashit filter-hook . WP 2.2.0
Filters the trailing-slashed string, depending on whether the site is set to use trailing slashes.
Usage
add_filter( 'user_trailingslashit', 'filter_function_name_4977', 10, 2 ); function filter_function_name_4977( $string, $type_of_url ){ // filter... return $string; }
- $string(string)
- URL with or without a trailing slash.
- $type_of_url(string)
- 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'.
Changelog
Since 2.2.0 | Introduced. |
Where the hook is called
user_trailingslashit
wp-includes/link-template.php 65
return apply_filters( 'user_trailingslashit', $string, $type_of_url );