cameronterry / dark-matter

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

get_rest_url() incorrect returns the admin domain in switch_to_blog() #92

Closed cameronterry closed 2 years ago

cameronterry commented 2 years ago

When called through rest_output_link_wp_head() (link) it returns the primary domain (correct). However, when called after using switch_to_blog(), it returns the admin domain (incorrect).

Discovered whilst adding the unit tests, which works with multisite through the switch_to_blog() / restore_current_blog() mechanism: https://github.com/cameronterry/dark-matter/pull/88.