WP-Print incompatible with WPML (multilingual)
-
Hi everyone.
First, thanks for a great plugin – WP-Print is simple and very effective!
However, there are some issues when using WP-Print alongside WPML (the wordpress multilingual). In a WPML site, pages have URLs such as:
(1)http://blabla.com/page?lang=fr
(2)http://blabla.com/fr/pageIn the first case, WP-Print simply appends the “/printpage/” suffix after the query, which obviously does not work. A better way would be to parse the permalink URL and append the WP-Print suffix to the path, and then reconstruct the URL.
A second issue happens even in the second URL form, when you have a static front page for the site. In this case, WP-Print generates the link to the print page via an internal “_get_page_link”, instead of the standard “get_permalink” (line 118 of wp-print.php). WPML does not hook into that method, so you get an invalid, non-WPML URL. I am not sure why the plugin uses _get_page_link – are there good reasons for that?
Anyway, I’m willing to help correct at least the first issue, but could some advise as to the second?
I imagine these problems could break other plugins that also change the site’s URL structure, not just WPML.
Thanks!
Shay
- The topic ‘WP-Print incompatible with WPML (multilingual)’ is closed to new replies.