WordPress.org

Ready to get started?Download WordPress

Forums

Root Relative URLs
[resolved] Patch to add support for working with the WPML Multilingual CMS plugin (3 posts)

  1. tfmtfm
    Member
    Posted 1 year ago #

    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',

    http://wordpress.org/extend/plugins/root-relative-urls/

  2. MarcusPope
    Member
    Plugin Author

    Posted 1 year ago #

    Done, thanks for the patch. You should see this in the next release.

  3. Jordan Boston
    Member
    Posted 9 months ago #

    Has this version been released Marcus? I am looking at version 2.3 in the repo.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic