[wp-hackers] Trailing Slash on Template Tags

Alexander Beutl xel at netgra.de
Thu May 29 11:30:10 GMT 2008


Viper: Template Tags are used (most of the time) to give you somewhat like
the templates directory. You will then go and append the / and the file you
want to access.
So the old templates (with hardcoded /) would create:
http://sub.example.org/path/wp-content/templates/mine//custom_style.css
new ones (without hardcoded /) would create
http://sub.example.org/path/wp-content/templates/mine/custom_style.css
which both work the same.
Users will not expect anything - they will not have anything to do with that
and the template directory will not be a place you want anyone browsing to.

Template Creators would expect the / to be there cause it will be needed
allways. So I really don't understand your point. Additional /es do not harm
anyone - left out /es will make templates break...

I don't really care if there is a automatic / or not - but I don't see any
way where this would harm anything....


2008/5/29 Viper007Bond <viper at viper007bond.com>:

> Yeah, it's very minor and users are expecting no trailing slash (which
> applies to more things than just URLs -- regex, str_replace(), etc.). As
> the
> saying goes, If it's not (truly) broken, don't fix it.
>
> On Thu, May 29, 2008 at 12:27 AM, Aaron Brazell <emmensetech at gmail.com>
> wrote:
>
> > It is a hit on Apache though. Minor, but Apache needs the slash to
> > determine
> > file or directory. It's an access time issue.
> > Say you type in http://wordpress.org/extend
> >
> > Apache responds by looking for a file called extend. Access point A. It
> > doesn't find it, so it fails back on directory lookup. Access point B.
> The
> > slash just saves Apache some access time and a little work. Neglible on a
> > small level. Big on scale.
> >
> > Personally, though, I think the slash at this point is moot for what it
> > gains us.
> >
> > On Thu, May 29, 2008 at 3:13 AM, Alexander Beutl <xel at netgra.de> wrote:
> >
> > > >
> > > > but it's much too late to add it.
> > >
> > > try using // instead of / - tell you what - it works the same.
> > > There is no difference in going to
> > > http://wordpress.org//download/
> > > or
> > > http://wordpress.org/download/
> > >
> > > both work perfectly.
> > >
> > > So I would say with that it is not to late to change it since this
> would
> > > make both possible (hardcoding the / or not).
> > >
> > > Ciao
> > > Alex
> > >
> > > 2008/5/29 Viper007Bond <viper at viper007bond.com>:
> > >
> > > > I'd agree if the function was new, but it's much too late to add it.
> > > >
> > > > On Wed, May 28, 2008 at 10:21 AM, Chris Poteet <cpoteet at siolon.com>
> > > wrote:
> > > >
> > > > > Why don't template tags such as bloginfo('template_url') include
> the
> > > > > trailing slash?  I mean, it has to be there anyway so why not add
> it?
> > > > > _______________________________________________
> > > > > wp-hackers mailing list
> > > > > wp-hackers at lists.automattic.com
> > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Viper007Bond | http://www.viper007bond.com/ |
> > http://www.finalgear.com/
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers at lists.automattic.com
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> >
> >
> >
> > --
> > --
> > Aaron Brazell
> > web:: www.technosailor.com
> > phone:: 410-608-6620
> > skype:: technosailor
> > twitter:: @technosailor
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
>
> --
> Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list