Changes between Initial Version and Version 1 of Ticket #44564, comment 4
- Timestamp:
- 07/18/2018 08:56:37 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #44564, comment 4
initial v1 1 1 Replying to [comment:3 SergeyBiryukov]: 2 > Hi @Fleuv, thanks for the ticket!3 >4 > > The following code will return an empty string.5 > > {{{#!php6 > > <?php7 > > echo wp_make_link_relative(home_url());8 > > }}}9 > >10 > >11 > > The expected result is: '/'12 >13 2 > That's because `home_url()` generally does not have a trailing slash. 14 >15 > This should work as expected:16 > {{{17 > echo wp_make_link_relative( home_url( '/' ) );18 > }}}19 3 20 Same goes for site_url(). Although it is confusing to note "Keeps the path '/' at the beginning" in the documentation if that isn't always true.4 Same goes for `site_url()`. Although it is confusing to note "Keeps the path '/' at the beginning" in the documentation if that isn't always true.