wppaste
WordPress

apply_filters( 'user_trailingslashit', string $url, string $type_of_url )

Since
2.2.0
Filters the trailing-slashed string, depending on whether the site is set to use trailing slashes.

Compatibility

WordPress
since 2.2.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$urlstring
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'.

Where this hook fires · 1

  • wp-includes/link-template.php:65user_trailingslashit()

Source code

	 *	 * @param string $url         URL with or without a trailing slash.	 * @param string $type_of_url 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'.	 */	return apply_filters( 'user_trailingslashit', $url, $type_of_url );} /** * Displays the permalink anchor for the current post. * * The permalink mode title will use the post title for the 'a' element 'id'

Changelog

Introduced in 2.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.