WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20861, comment 7


Ignore:
Timestamp:
11/06/2012 02:38:57 PM (6 years ago)
Author:
jaroat
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20861, comment 7

    initial v1  
    11Seems 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).
    22
    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.
     3get_extra_permastruct relies on it's internal var extra_permastructs which doesn't get updated to the new context when calling switch_to_blog.
    44
    55So 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.