Outil de recherche WordPress pour les développeurs et auteurs de thèmes



the_modified_date ›

Depuis2.1.0
Dépréciéen/a
the_modified_date ( $d = '', $before = '', $after = '', $echo = true )
Paramètres: (4)
  • (string) $d Optional. PHP date format defaults to the date_format option if not specified.
    Requis: Non
    Défaut: (vide)
  • (string) $before Optional. Output before the date.
    Requis: Non
    Défaut: (vide)
  • (string) $after Optional. Output after the date.
    Requis: Non
    Défaut: (vide)
  • (bool) $echo Optional, default is display. Whether to echo the date or return it.
    Requis: Non
    Défaut: true
Retourne:
  • (string|void) String if retrieving.
Défini(e) dans:
Codex:

Display the date on which the post was last modified.



Source

function the_modified_date( $d = '', $before = '', $after = '', $echo = true ) {
	$the_modified_date = $before . get_the_modified_date( $d ) . $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 $d                 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, $d, $before, $after );

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

}