• I made this hack to make the plugin Gecka Submenu work with Polylang.

    class WPML_Fix {
    	function get_default_language() {
    		return pll_default_language();
    	}
    }
    
    $GLOBALS['sitepress'] = new WPML_Fix();

    Gecka calls for the method get_default_language via the global $sitepress. So there for this fix. Maybe there is a better solution?

    http://wordpress.org/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Plugin Author Chouby

    (@chouby)

    I would do the same.

    I am aware that some themes / plugins use internal methods of the ‘sitepress’ object (this one but I also saw usage of ‘is_translated_post_type’ and ‘is_translated_taxonomy’).

    This is certainly the cause for fatal errors if the theme / plugin does not test for the existence of the object itself, but for something like ICL_LANGUAGE_CODE (implemented by Polylang) to detect the presence of WPML.

    But I am reluctant to add this to the WPML compatibility mode, which mostly implements documented functions.

Viewing 1 replies (of 1 total)
  • The topic ‘WPML fix for Gecka Submenu’ is closed to new replies.