facetwp change date format in layout builder

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
add_filter( ‘facetwp_builder_item_value’, function( $value, $item ) {
if ( ‘el-ymud8n’ == $item[‘settings’][‘name’] ) {
$value = date_create( $value );
$value = date_format( $value, “d-m-Y” );
}
return $value;
}, 10, 2 );
{{/gist}}