[wp-trac] [WordPress Trac] #22267: Add optional boolean argument to trailingslashit() and untrailingslashit()
WordPress Trac
noreply at wordpress.org
Wed Oct 24 04:27:26 UTC 2012
#22267: Add optional boolean argument to trailingslashit() and untrailingslashit()
-------------------------+------------------------------
Reporter: knutsp | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem | Version: 2.2
Severity: normal | Resolution:
Keywords: 2nd-opinion |
-------------------------+------------------------------
Changes (by knutsp):
* component: Formatting => Filesystem
Comment:
Just to precise, by
> On Windows, for making a path to $subdir one may use either ...
I meant when in a code block like:
{{{
$is_win = ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) )
if ( $is_win ) { // one may use either:
$path = trailingslashit( $path, true ) . $subdir; // this works
$path = untrailingslashit( $path, true ) . '/' . $subdir; // also
works
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22267#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list