[wp-trac] [WordPress Trac] #35287: get_site_url does not accept path parameter
WordPress Trac
noreply at wordpress.org
Sun Jan 3 00:25:17 UTC 2016
#35287: get_site_url does not accept path parameter
--------------------------+----------------------
Reporter: WebDevDLo | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => invalid
Comment:
> So, the issue is that first parameter is not defaulted as specified.
That's the bug. Does that make sense?
When you call `get_site_url('ajax-random-ad/')` you are specifying the
first parameter, so the defaults do not kick in. In order to specify the
2nd parameter, you need to specify the first, so `get_site_url( null,
'/ajax-random-ad/' );` or as pointed out, use `site_url( 'ajax-random-ad/'
)` directly instead.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35287#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list