Patch to add support for working with the WPML Multilingual CMS plugin
-
WPML Multilingual CMS is a commercial plugin. A third party wrote a wordpress site for us using it, and I have modified it to use root-relative URLs. To make it work I had to apply the patch below, I’m not sure if you are interested in it. I’m not sure if the first part of the patch is specific to WPML, or something in the theme they also wrote for us.
--- wordpress/wp-content/plugins/root-relative-urls/sb_root_relative_urls.php (revision 5217) +++ wordpress/wp-content/plugins/root-relative-urls/sb_root_relative_urls.php (revision 5218) @@ -265,7 +265,25 @@ ) ); + # fix links to javascript loaded with wp_enqueue_script where the files are located in wp-include (e.g. wp_enqueue_script( 'comment-reply' ); in wp-content/themes/carrierweb/header.php) add_filter( + 'script_loader_src', + array( + 'MP_WP_Root_Relative_URLS', + 'proper_root_relative_url' + ) + ); + + # support links generated by the WPML plugin (i.e. for the multi-lingual support) + add_filter( + 'WPML_filter_link', + array( + 'MP_WP_Root_Relative_URLS', + 'proper_root_relative_url' + ) + ); + + add_filter( 'image_send_to_editor', array( 'MP_WP_Root_Relative_URLS',
https://www.ads-software.com/extend/plugins/root-relative-urls/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Patch to add support for working with the WPML Multilingual CMS plugin’ is closed to new replies.