apply_filters( 'learndash_date_time_formats', string $display_format )
Filters LearnDash date and time format.
Description #
Parameters #
- $display_format
-
(string) Format to display the date.
Return #
(string)
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_date_time_formats filter.
*/
add_filter(
'learndash_date_time_formats',
function( $current_format = '' ) {
// Set $current format to ANY combination of date/time format variables desired.
$current_format = 'l, F j, Y H:i';
// Always return the format variable.
return $current_format;
}
);
Changelog #
| Version | Description |
|---|---|
| 4.20.0 | This filter is now also applied when a format was specified rather than only to the default. |
| 2.2.0 | Introduced. |