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

Language menu-item return site_url instead of home_url #247

@ptrckvzn

Description

@ptrckvzn

Version Information

  • WordPress: 4.7
  • MultilingualPress: 2.4.8

Steps to Reproduce

  1. Create a multisite installation with WordPress in subfolder /wp
  2. Define WP_HOME to example.com and WP_SITEURL to example.com/wp in PHP config
  3. Add 2 blogs (main + 1) with a menu with a language menu-item pointing to the translation
  4. On second blog's front page, check the returned site_url for main blog

What I Expected

I am expecting it to return home_url (example.com).

What Happened Instead

On main blog, the language menu item return proper front-page site url for other blog translation. But, on second blog, the language menu item returned for front-page of main blog is site_url (example.com/wp).

I was able to fix this by changing get_site_url to get_home_url here

Is this the proper behavior? Should the url returned be home_url instead of site_url?

Notes

I am using Roots' project structure Bedrock

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions