Created
May 24, 2017 16:26
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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