WordPress.org

Ready to get started?Download WordPress

Forums

WP Email Invisibliser
[resolved] Output in a span rather than a div? (8 posts)

  1. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 1 year ago #

    Great plugin Adam - very useful

    Putting the shortcode within a paragraph of text forced an inline email address onto a new line and produced invalid html as a div was nested within the paragraph.

    To output the 'invisiblised' email address in a span rather than a div, I just changed line 37 of wp_mail_invisibliser.php to

    return "<span class='wp_hide_email $temp'>{This email is obscured. Your must have javascript enabled to see it}</span>";

    Is there any reason why this change or something similar shouldn't be included in the plugin's next update?

    http://wordpress.org/extend/plugins/wp-email-invisibliser/

  2. johnnytucats
    Member
    Posted 1 year ago #

    Nice one, cubecolour! Made that change here.

  3. Adam Sargant
    Member
    Plugin Author

    Posted 1 year ago #

    will do :-)

  4. rjianu
    Member
    Posted 1 year ago #

    Is there a way to show the name instead of the link?
    I was thinking more along the lines of < a href="mailto:blah">name</a> and just having the name to show

  5. Adam Sargant
    Member
    Plugin Author

    Posted 1 year ago #

    That would be possible... I'll look at adding a name option to the shortcode

  6. fuzzie
    Member
    Posted 1 year ago #

    Is there a way to show the name instead of the link?

    I'd like that function too.

    Tip: We have a page, using TablePress plugin and the shortcode wasn't working. I added a blank shortcode [hide_email ] before the table, and it fixed it.
    Check it out here:
    http://gulfridgecouncil.org/allohak/contacts/

  7. yarik.kuzmenko
    Member
    Posted 1 year ago #

    Hi!

    It's not working in template:
    <?php echo do_shortcode('[hide_email myemail@mydomain.com]'); ?>

    Output:
    {This email is obscured. Your must have javascript enabled to see it}

    Please, help.

  8. Adam Sargant
    Member
    Plugin Author

    Posted 1 year ago #

    That won't work... the plugin parses the post content to detect the shortcode before enqueueing the necessary javascript in order to prevent unnecessary scripts being loaded

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.