cameronterry / dark-matter

A highly opinionated domain mapping plugin for WordPress Networks
Other
12 stars 2 forks source link

Yoast SEO displaying admin domain, not mapped #16

Closed cameronterry closed 7 years ago

cameronterry commented 7 years ago

And the irony of the screenshot isn't lost on me either ...

image

cameronterry commented 7 years ago

Well it would appear that it is using home_url(), which should have spat out the "Primary domain" rather than the "Admin domain".

https://github.com/Yoast/wordpress-seo/blob/4.0.2/admin/formatter/class-post-metabox-formatter.php#L84-L105

So there appears to be an oversight in the pre_option_home filter which is being missed here. Possibly related to the issue in #15.

cameronterry commented 7 years ago

It would seem the issue was introduced with the following code snippet; https://github.com/cameronterry/dark-matter/commit/f23ce26f22a0c345631833bd7873a64f89633d93#diff-1117b1f931f61246ed2c07a83c7603a3R126

It might be enough to remove it as long as other issues do not bubble to the surface. Will continue testing without it and see what happens.

Actually never mind - based on the WordPress Core code for get_option(), the check is redundant as the value is always false. So will remove the if conditional.