Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Fix /wp added to sites admin url when multisite is not a subdomain install #2

Merged
merged 3 commits into from
Oct 17, 2017

Conversation

ptrckvzn
Copy link
Contributor

@ptrckvzn ptrckvzn commented Oct 3, 2017

Proposed fix for #1

This conditional won't append /wp to admin url when not a subdomain install and not the main site. I haven't tested it enough, but it seems to work. I will keep testing on my current project.

@QWp6t
Copy link
Member

QWp6t commented Oct 3, 2017

Instead of unnecessary nesting, the statements can be combined.

Something like this:

if (substr($url, -3) !== '/wp' && (is_main_site() || is_subdomain_install())) {

@JulienMelissas
Copy link
Contributor

JulienMelissas commented Oct 3, 2017

Thanks for this! I'll be honest in that I don't have a subdirectory multisite install I can test so I'm going to have to take your word for it 😄

Does it work everywhere else?

@greatislander
Copy link

Tested this on a subdirectory install and it works great!

@JulienMelissas JulienMelissas merged commit e664180 into roots:master Oct 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants