Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Change Date format in front-end
*/
add_filter('um_profile_field_filter_hook__date','my_custom_sanitize_fields', 9999, 2 );
function my_custom_sanitize_fields( $value, $data ){
global $ultimatemember;
if( $data['metakey'] == 'date-pickah' ){
$value = $ultimatemember->datetime->format( $value, "d M Y");
}
return $value;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment