the_modified_date

Advertisement

Summery Summery

Display the date on which the post was last modified.

Syntax Syntax

the_modified_date( string $format = '', string $before = '', string $after = '', bool $echo = true )

Parameters Parameters

$format

(Optional) PHP date format defaults to the date_format option if not specified.

Default value: ''

$before

(Optional) Output before the date.

Default value: ''

$after

(Optional) Output after the date.

Default value: ''

$echo

(Optional) default is display. Whether to echo the date or return it.

Default value: true

Return Return

(string|void) String if retrieving.

Source Source

File: wp-includes/general-template.php

	$allowed = '';
	foreach ( (array) $allowedtags as $tag => $attributes ) {
		$allowed .= '<' . $tag;
		if ( 0 < count( $attributes ) ) {
			foreach ( $attributes as $attribute => $limits ) {
				$allowed .= ' ' . $attribute . '=""';
			}
		}
		$allowed .= '> ';
	}
	return htmlentities( $allowed );
}

/***** Date/Time tags */

/**
 * Outputs the date in iso8601 format for xml files.
 *
 * @since 1.0.0
 */
function the_date_xml() {
	echo mysql2date( 'Y-m-d', get_post()->post_date, false );
}

Advertisement

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Advertisement

Leave a Reply