[wp-trac] Re: [WordPress Trac] #4652: Page and category trailing
back-slash dependent on post permalink structure
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 19 01:44:40 GMT 2007
#4652: Page and category trailing back-slash dependent on post permalink structure
------------------------+---------------------------------------------------
Reporter: snakefoot | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone: 2.2.2
Component: General | Version: 2.2
Severity: major | Resolution:
Keywords: wp_rewrite |
------------------------+---------------------------------------------------
Comment (by snakefoot):
Ok just discovered that user_trailingslashit has a nice filter also, much
prettier plugin now:
{{{
<?php
function fix_slash($string, $type) {
global $wp_rewrite;
if ($wp_rewrite->use_trailing_slashes==false && $type != 'single')
return trailingslashit($string);
return $string;
}
add_filter('user_trailingslashit', 'fix_slash', 66, 2 );
?>
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/4652#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list