Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created May 24, 2017 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/ee3879f54953a0bb070fe1b8fdbf9938 to your computer and use it in GitHub Desktop.
Save tripflex/ee3879f54953a0bb070fe1b8fdbf9938 to your computer and use it in GitHub Desktop.
WP Job Manager Field Editor encode email output using Email Address Encoder plugin
<?php
// The filter is field_editor_output_as_value_METAKEY
// where you need to replace METAKEY with the actual meta key you want to filter the output for
add_filter( 'field_editor_output_as_value_META_KEY_ONE', 'smyles_encode_email_on_output' );
function smyles_encode_email_on_output( $value ){
if( empty( $value ) ) return $value;
if( function_exists( 'eae_encode_str' ) ){
$value = eae_encode_str( $value );
}
return $value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment