WordPress.org

Ready to get started?Download WordPress

Forums

Pixeline's Email Protector
[resolved] Does this plugin filter just 'the_content'? Or, the entire HTML? (7 posts)

  1. Adam
    Member
    Posted 1 year ago #

    Does this plugin filter just 'the_content'? Or, the entire HTML page? I'd like to be able to enter email addresses anywhere within a page (the WP editor, sidebar.php, footer.php, etc.), and have all addresses obfuscated. Thanks!

    http://wordpress.org/extend/plugins/pixelines-email-protector/

  2. pixeline
    Member
    Plugin Author

    Posted 1 year ago #

    It parses the content inside the wysiwyg content, title, excerpt and widgets. It would be too costly resource-wise to filter the output html code not in the database, so for emails inserted in theme files, you can use the provided function :

    echo safe_email('you@domain.com');

  3. Adam
    Member
    Posted 1 year ago #

    Seems like it really isn't possible to filter either within the <body> tag or within all custom fields. I've seen this with other plugins and non-Plugin (PHP-only) solutions. That's really too bad that it isn't possible to have just a plugin or one PHP function that would filter an entire page and protect all email addresses.

    Thanks for your reply!

  4. pixeline
    Member
    Plugin Author

    Posted 1 year ago #

    It is possible, using php's ob_handler() functions. But that would mess up with so many wordpress plugins that it's really not advised. I did some tryouts for this very plugin and it created havocs on my test site, especially using caching plugins (which are very popular). So you should really just use the custom function on your theme files. It's not really that big of a deal compared to the protection this plugin gives you - for free.

  5. Adam
    Member
    Posted 1 year ago #

    This is good protection for free. Thank you for that!

    My trouble is that clients tend to enter email addresses in the main WP Editor as well as some custom fields that I've created. Many clients want their email addresses in plain sight on a website, and not necessarily to be contacted through a form. It's annoying. :)

  6. pixeline
    Member
    Plugin Author

    Posted 1 year ago #

    I never thought about filtering custom field. I'll see if that's possible (i guess it is).

    Did you know you can desactivate the WP Theme Editor?
    Put this line in your wp-config.php file:

    define( 'DISALLOW_FILE_EDIT', true );

    You shouldn't let customers touch that in any case IMHO.

  7. Adam
    Member
    Posted 1 year ago #

    I deactivate the theme editor with every site. I was referring to the editor which is output with <?php the_content(); ?>. Thanks for the tip!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic