Changes between Initial Version and Version 1 of Ticket #20861, comment 7
- 11/06/12 14:38:57 (3 years ago)
initial v1 1 1 Seems that get_permalink for custom post types depends on get_extra_permastruct in wp-includes/rewrite.php and acts wrongly if the target custom post types was registered with the "with_front" parameter (or without: with_front=1 is default). 2 2 3 get_extra_permastruct relies on it's internal var extra_permastructs ['post-type-name']which doesn't get updated to the new context when calling switch_to_blog. 3 get_extra_permastruct relies on it's internal var extra_permastructs which doesn't get updated to the new context when calling switch_to_blog. 4 4 5 5 So all permalinks fetched after switch_to_blog get constructed in the rewrite-context of the original blog calling the function - not the blog context the programmer switched to.