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

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

Default value: ''

$before

(string) (Optional) Output before the date.

Default value: ''

$after

(string) (Optional) Output after the date.

Default value: ''

$echo

(bool) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.