WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
Missing filter site_url (1 post)

  1. davidnde
    Member
    Posted 2 years ago #

    I was wondering that some urls create by some plugins don't get the language subdomain in my qTrasnlate powered wordpress install. This causes Allow-Origin errors with some javascript code provided by some other plugins.

    The reason is, that qTranslate does not add a filter site_url for transforming urls.
    Please be aware, that bloginfo_url and site_url refer to two different things in wordpress: difference-between-get-bloginfourl-and-get-site-url.

    I changed

    add_filter('bloginfo_url', 'qtrans_convertBlogInfoURL',10,2);

    in qtranslate_hooks.php into

    add_filter('bloginfo_url', 'qtrans_convertBlogInfoURL',10,2);
    add_filter('site_url', 'qtrans_convertURL',10,1);

    This is doing the trick and in my installation it works without any issues so far.

    I would be glad if you could implement this.

    Thanks for the great plugin
    David

    http://wordpress.org/extend/plugins/qtranslate/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic