the_date
Filters the date a post was published for display.
Использование
add_filter( 'the_date', 'wp_kama_the_date_filter', 10, 4 ); /** * Function for `the_date` filter-hook. * * @param string $the_date The formatted date string. * @param string $format PHP date format. * @param string $before HTML output before the date. * @param string $after HTML output after the date. * * @return string */ function wp_kama_the_date_filter( $the_date, $format, $before, $after ){ // filter... return $the_date; }
- $the_date(строка)
- The formatted date string.
- $format(строка)
- PHP date format.
- $before(строка)
- HTML output before the date.
- $after(строка)
- HTML output after the date.
Список изменений
С версии 0.71 | Введена. |
Где вызывается хук
the_date
wp-includes/general-template.php 2562
$the_date = apply_filters( 'the_date', $the_date, $format, $before, $after );