Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Given example can be used to format timestamp into human-readable date, but the same logic can be used for any modifications
*/
add_filter( 'jet-engine/admin-filters/filter-label', function( $label, $filter ) {
if ( 'meta' === $filter['type'] && '__date' === $filter['meta_key'] ) {
$label = date_i18n( get_option( 'date_format' ), $label );
}
return $label;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment