Filters

Filters

Filters are snippets of code that allow you to pass data through, they are used to enable overriding data used in plugins and themes. This plugin has several features allowing you to customise some aspects. Normally filters are applied to customise themes by inserting the code into a child theme’s functions.php.

Combined Date – Time Format

The combined date / time format appears in several layouts and typically looks like 12/02/2019, 10:00 – 11:00

filter: (‘wfea_combined_date_time_time_format‘ , $format)

$format defaults to your settings -> general -> time format

example: include am / pm

add_filter( 'wfea_combined_date_time_time_format', function ( $format ) {
	return 'g:i a';
}, 10, 1 );

filter: (‘wfea_combined_date_time_date_format‘ , $format)

$format defaults to your settings -> general -> date format, plus a , and space

example: display like 16th January

add_filter( 'wfea_combined_date_time_date_format', function ( $format ) {
	return 'jS F';
}, 10, 1 );

Date formats are documented here https://wordpress.org/support/article/formatting-date-and-time/

Was this helpful?