WordPress.org

Ready to get started?Download WordPress

Forums

Widget Context
URL decode for non english language (1 post)

  1. Samiul Amin
    Member
    Posted 7 months ago #

    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'];
    		else
    			$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.

    http://wordpress.org/plugins/widget-context/

Reply

You must log in to post.

About this Plugin

About this Topic