Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// EUD - field key encoding ##
\add_filter( 'q/eud/export/value', [ get_class(), 'format_value' ], 10, 2 );
/**
* Filter export key value in EUD plugin
*
* @since 2.0.0
*/
public static function format_value( $value = null, $field = null )
{
#helper::log( 'value from EUD filter: '.$value );
if ( is_null( $value ) ) {
return false;
}
// kick it back with encoding formatting ##
return htmlentities( $value, ENT_COMPAT, 'UTF-8' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment