WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#32705 new defect (bug)

`includes_url` shouldn't use `site_url()` on the frontend

Reported by: wonderboymusic Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: needs-patch 2nd-opinion
Focuses: multisite Cc:

Description

Multisite / Domain Mapping

  1. site_url() is your admin, home_url() is your frontend
  2. The site url is blocked behind a firewall
  3. You call includes_url() for a script on the frontend: your script is blocked, because it loads your admin domain on the frontend

I noticed this because we are trying to upgrade the NYT to 4.2.* and emoji scripts are showing up everywhere.
I can remove the action for now.

Change History (3)

#1 @dd32
3 years ago

  • Focuses multisite added
  • Keywords needs-patch 2nd-opinion added

#2 @dd32
3 years ago

For a single-site install, this would be incorrect:

The Site URL is supposed to be the location of the actual files, the Home URL is supposed to be the rewritten front-end (ie. site: dd32.id.au/wordpress home: dd32.id.au)

Having includes_url() use home_url() on the front-end would be incorrect in that case.

Personally this feels like it's plugin territory, site_url/home_url should be accessible, and admin_url/site_url should be rewritten with a plugin to the secret location on the fly for the admin requests.

#3 @wonderboymusic
3 years ago

  • Milestone changed from 4.3 to Future Release

I am not sure what I want to do here

Note: See TracTickets for help on using tickets.