[wp-hackers] user_trailingslashit()?

Mike Schinkel mikeschinkel at newclarity.net
Tue Dec 8 05:57:00 UTC 2009


Hi all:

So here's another question; what exactly is user_trailingslashit() for and how are they supposed to be used?  Google is decidedly *not* my friend here and reading the code does me little better.

This is from the code provided by Diaon (dd32).  I don't understand why he first does trailingslashit() and then user_trailingslashit().  Any idea?

        $permastruct = $wp_rewrite->get_page_permastruct();
        if (!empty($permastruct)) {
          $link = trailingslashit(get_bloginfo('home')) . str_replace('%pagename%', $post_type['plural'] . '/' . $post->post_name, $permastruct);
          $link = user_trailingslashit($link);
        } else {
          $link = trailingslashit(get_bloginfo('home')) . '?' . $post_type['name'] . '=' . $post->post_name;
        }

Any idea why something would run the user_trailingslashit filter?

-Mike


More information about the wp-hackers mailing list