WordPress.org

Forums

Polylang
Incompatibility with plugin WP Mailto Links? (6 posts)

  1. Christian Ries
    Member
    Posted 3 years ago #

    Polylang seems to be incompatible to plugin WP Mailto Links, when this is activated, the page content is not shown any more.

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

  2. Chouby
    Member
    Plugin Author

    Posted 3 years ago #

    Well I found the bug... Not in Polylang but in WP Mailto Links. this plugin is 'internationalized' (ready for translation) but not 'localized' (translated), so probably no i18n test has been made and in fact things are in my opinion done the wrong way. Correcting this is quite simple. I suggest that you resquest a bug release to the plugin author. Waiting for it, here is the solution.

    line 87, replace:
    load_plugin_textdomain( $this->domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
    by:
    add_action( 'init', array( $this, 'init' ) );

    Then at line 100, add the following function:

    function init() {
    		load_plugin_textdomain( $this->domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
    	}

    It should work after these modifications.

  3. Christian Ries
    Member
    Posted 3 years ago #

    Thank you Chouby, the solution doesn't work in my case, maybe there is another interaction with unother plugin. I will follow your advise and request a bug release.

  4. freelancephp
    Member
    Posted 3 years ago #

    @Christian Could you test again with the new version 0.24?

    @Chouby You're right. It's better to put the code in the init callback (so I did).

  5. Christian Ries
    Member
    Posted 3 years ago #

    Hi freelancephp, I tested your new version with one website and it seems to work. I'm not using WP Mailto Links any more, I switched to "Email Encoder Bundle".

  6. freelancephp
    Member
    Posted 3 years ago #

    Hello Christian, thank you for testing!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic