Title: Avoid *protected email* in php output
Last modified: March 18, 2022

---

# Avoid *protected email* in php output

 *  [symbolily](https://wordpress.org/support/users/symbolily/)
 * (@symbolily)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/avoid-protected-email-in-php-output/)
 * Hello, I am using your plugin and it does a great work, thank you.
 * I am generating a .doc file with the entries of a custom post type and ACF but
   the email field, of course protected with your plugin, gives me as output *protected
   email*.
    The code that I am using is the following (of course I omit the code
   not pertinent to this post):
 *     ```
       <?php $args = array(
               'post_type' => 'my_post_type',
               'post_status' => 'publish',
               'posts_per_page' => -1,
               'orderby' => 'title',
               'order' => 'ASC',
           );
   
           $loop = new WP_Query( $args );
   
           while ( $loop->have_posts() ) : $loop->the_post();
   
        while ( have_rows( 'main_acf_group' ) ) : the_row();
          the_sub_field( 'email' );
        endwhile;
       ```
   
 * Can you give me any help?
    Thank you Alberto
    -  This topic was modified 4 years, 2 months ago by [symbolily](https://wordpress.org/support/users/symbolily/).
    -  This topic was modified 4 years, 2 months ago by [symbolily](https://wordpress.org/support/users/symbolily/).

Viewing 1 replies (of 1 total)

 *  [Ironikus](https://wordpress.org/support/users/ironikus/)
 * (@ironikus)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/avoid-protected-email-in-php-output/#post-15581639)
 * Hi [@symbolily](https://wordpress.org/support/users/symbolily/) – good question!
   
   You could try to use the following filter to prevent the encoding from happening:`
   apply_filters( 'eeb/validate/is_post_excluded', $return, $post_id, $skip_posts);`
   This filter is called within the `EEB()->validate->is_post_excluded()` function
   and usually prevents specific posts from firing. The $return variable contains
   a bool – simply set it to **true** to prevent the post from being encoded.

Viewing 1 replies (of 1 total)

The topic ‘Avoid *protected email* in php output’ is closed to new replies.

 * ![](https://ps.w.org/email-encoder-bundle/assets/icon-256x256.png?rev=2056506)
 * [Email Encoder - Protect Email Addresses and Phone Numbers](https://wordpress.org/plugins/email-encoder-bundle/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-encoder-bundle/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-encoder-bundle/)
 * [Active Topics](https://wordpress.org/support/plugin/email-encoder-bundle/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-encoder-bundle/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-encoder-bundle/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ironikus](https://wordpress.org/support/users/ironikus/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/avoid-protected-email-in-php-output/#post-15581639)
 * Status: not resolved