• Resolved SaschaN

    (@saschan)


    Hi!

    After updating to version 0.7 I always have the “successfully encoded” message under each encoded email address in my pages and posts. This message is also visible when currently not logged-in as an admin, so every visitor of the page will see this.

    As a workaround I changed the “get_html_checked” function as follows:

    function get_html_checked($content) {
        if(current_user_can('manage_options')) {
            return $content
                . '<a href="javascript:;" class="encoded-check"'
                . ' title="' . __('Successfully Encoded (this is a check and only visible when logged in as admin)', $this->domain) . '">'
                . '<img class="encoded-check-icon" src="' . plugins_url('images/icon-email-encoder-bundle.png', __FILE__)
                . '" alt="' . __('Encoded', $this->domain) . '" />'
                . __('Succesfully Encoded', $this->domain) . '</a>';
        } else {
            return $content;
        }
    }

    Best regards
    Sascha

    http://wordpress.org/extend/plugins/email-encoder-bundle/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Pi Zi

    (@freelancephp)

    Hello Sascha,
    I tested it on multiple sites and it does not show the “succesfully encoded” message on the site when I am logged out.

    The check you implemented is already done earlier on the “wp” action:
    $this->logged_in = (bool) ($user_ID && current_user_can('level_10'));

    Gr, Victor

    Pi Zi

    (@freelancephp)

    Sascha, I found the bug. It does not check when “Html Encode” method is being used. I will fix this, hopefully release it within a few hours.

    Thread Starter SaschaN

    (@saschan)

    Hello Victor,

    I guess I found it: I had the “HTML encoding” method selected. Strange, I’m sure I’d selected “Javascript ASCII” after the first install of the plugin. With “Javascript ASCII” it’s working as expected.

    Nevertheless: Shouldn’t the “HTML encoding” hide the “encoded” message either?

    Best regards
    Sascha

    Thread Starter SaschaN

    (@saschan)

    Seems that we both found where the bug is. Was on the phone for 20 minutes until I wrote my last sentence and pressed “post”. So I didn’t notice that you already found it.

    Pi Zi

    (@freelancephp)

    Always good to have a second opinion 😉

    Indeed, it should work for HTML Encoding as well. Fixed it, with some other issues in version 0.71.

    Note: I made an extra option in the admin panel to show this message. You have to enable this option first (it’s off by default).

    Thanks for your help Sascha!

    Gr, Victor

    Thread Starter SaschaN

    (@saschan)

    Never mind!

    Thanks for this nice plugin!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Version 0.7 always shows the "successfully encoded" message’ is closed to new replies.