When using FORCE_SSL_ADMIN, WP is returning the wrong URLs when a plugin calls get_permalink().
I’ve quickly looked in the code and for a post, get_post_permalink() is called, which relies on home_url() to return the correct URL.
The problem seems to be that home_url() is not checking whether FORCE_SSL_ADMIN is enabled or not and builds a URL using the current context. Meaning that if a user administers a site using SSL, the permalinks sent to plugins (in the backend) are the secure ones which is not what is defined in the configuration.
So is it a plugin problem (should use a different function) or is this a WP issue?
Seems logical to me to just call get_permalink() to get a post’s URL to manipulate in my plugin and to trust WP to return the correct one.