[wp-hackers] user_trailingslashit()?

Andrew Nacin anacin at gwhatchet.com
Tue Dec 8 06:02:53 UTC 2009


Try checking the phpdoc.  For user_trailingslashit:

  20   * Retrieve trailing slash string, if blog set for adding
trailing slashes.
  21   *
  22   * Conditionally adds a trailing slash if the permalink
structure has a trailing
  23   * slash, strips the trailing slash if not. The string is passed
through the
  24   * 'user_trailingslashit' filter. Will remove trailing slash
from string, if
  25   * blog is not set to have them.
  26   *
  27   * @since 2.2.0
  28   * @uses $wp_rewrite
  29   *
  30   * @param $string String a URL with or without a trailing slash.
  31   * @param $type_of_url String the type of URL being considered
(e.g. single, category, etc) for use in the filter.
  32   * @return string
  33   */

For trailingslashit:

1163   * Appends a trailing slash.
1164   *
1165   * Will remove trailing slash if it exists already before adding
a trailing
1166   * slash. This prevents double slashing a string or path.
1167   *
1168   * The primary use of this is for paths and thus should be used
for paths. It is
1169   * not restricted to paths and offers no specific path support.
1170   *
1171   * @since 1.2.0
1172   * @uses untrailingslashit() Unslashes string if it was slashed already.
1173   *
1174   * @param string $string What to add the trailing slash to.
1175   * @return string String with trailing slash added.


More information about the wp-hackers mailing list