[wp-trac] [WordPress Trac] #26985: Use network_site_url in includes_dir
WordPress Trac
noreply at wordpress.org
Sat Feb 1 18:37:39 UTC 2014
#26985: Use network_site_url in includes_dir
--------------------------------+-----------------------------
Reporter: nofearinc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: multisite |
--------------------------------+-----------------------------
The `includes_dir` function is used in several places for getting the path
to `wp-includes`. For example, `class-wp-editor.php` is using it to get
the `$baseurl` variable and load other related scripts (such as TinyMCE)
accordingly.
On a multisite, `includes_dir` relies on `site_url` which leads to a
similar path if ran on a subsite in a network:
{{{
site.com/subsite/wp-includes/...
}}}
If a server like nginx doesn't have a working rewrite for a given version,
across the site we could use hooks such as `script_loader_src` or
`style_loader_src` to work around the problem, and we could also filter
`includes_url` to set the correct paths (as workarounds). I suggest
switching to `network_site_url` instead as it fallbacks to `site_url` for
single sites.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26985>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list