Support » Plugin: Widget Context » URL decode for non english language

  • I am currently working on wordpress project with WPML. I notice that for non english language (Bangla in our case) widget context not working. Example:

    English: /project-detail/ == working
    Bangla: /প্রকল্প-বিবরণ/ not working

    So I modify get_current_url function to fix my problem:

    function get_current_url() {
    		if ($_SERVER['REQUEST_URI'] == '')
    			$uri = $_SERVER['REDIRECT_URL'];
    			$uri = $_SERVER['REQUEST_URI'];
            <strong>$uri = rawurldecode($uri);</strong>
    		return (is_ssl())
    			? "https://".$_SERVER['SERVER_NAME'].$uri
    			: "http://".$_SERVER['SERVER_NAME'].$uri;

    I think this fix should apply to your plugin.

    Thank you.

  • The topic ‘URL decode for non english language’ is closed to new replies.