[wp-trac] Re: [WordPress Trac] #3899: Function user_trailingslashit
breaks .html permalinks
WordPress Trac
wp-trac at lists.automattic.com
Sat Mar 10 06:28:40 GMT 2007
#3899: Function user_trailingslashit breaks .html permalinks
--------------------------------------+-------------------------------------
Reporter: lunabyte | Owner: anonymous
Type: defect | Status: closed
Priority: normal | Milestone: 2.2
Component: Administration | Version: 2.2
Severity: major | Resolution: fixed
Keywords: permalink html canonical |
--------------------------------------+-------------------------------------
Changes (by markjaquith):
* keywords: permalink html => permalink html canonical
Comment:
Now plugins can filter on 'user_trailingslashit' which will pass along as
a second param the type of URL being filtered. So for lunabyte, you'd do
this in a plugin:
{{{
function lunabyte_trailingslashes($string, $type) {
if ( 'single' == $type )
return $string;
else
return trailingslashit($string);
}
add_filter('user_trailingslashit', 'lunabyte_trailingslashes', 10, 2);
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/3899#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list