Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



the_modified_date ›

Seit2.1.0
Veraltetn/v
the_modified_date ( $format = '', $before = '', $after = '', $echo = true )
Parameter: (4)
  • (string) $format Optional. PHP date format defaults to the date_format option if not specified.
    Erforderlich: Nein
    Standard: (leer)
  • (string) $before Optional. Output before the date.
    Erforderlich: Nein
    Standard: (leer)
  • (string) $after Optional. Output after the date.
    Erforderlich: Nein
    Standard: (leer)
  • (bool) $echo Optional. Whether to echo the date or return it. Default true.
    Erforderlich: Nein
    Standard: true
Gibt zurück:
  • (string|void) String if retrieving.
Definiert in:
Codex:

Display the date on which the post was last modified.



Quellcode

function the_modified_date( $format = '', $before = '', $after = '', $echo = true ) {
	$the_modified_date = $before . get_the_modified_date( $format ) . $after;

	/**
	 * Filters the date a post was last modified for display.
	 *
	 * @since 2.1.0
	 *
	 * @param string $the_modified_date The last modified date.
	 * @param string $format            PHP date format. Defaults to 'date_format' option
	 *                                  if not specified.
	 * @param string $before            HTML output before the date.
	 * @param string $after             HTML output after the date.
	 */
	$the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $format, $before, $after );

	if ( $echo ) {
		echo $the_modified_date;
	} else {
		return $the_modified_date;
	}

}