the_modified_date

The timeline below displays how wordpress function the_modified_date has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Displays the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $format  Optional. PHP date format. Defaults to the 'date_format' option.
 * @param string $before  Optional. Output before the date. Default empty.
 * @param string $after   Optional. Output after the date. Default empty.
 * @param bool   $display Optional. Whether to echo the date or return it. Default true.
 * @return string|void String if retrieving.
 */
function the_modified_date($format = '', $before = '', $after = '', $display = 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|false $the_modified_date The last modified date or false if no post is found.
     * @param string       $format            PHP date format.
     * @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 ($display) {
        echo $the_modified_date;
    } else {
        return $the_modified_date;
    }
}

WordPress Version: 6.1

/**
 * Displays the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
 * @param string $before Optional. Output before the date. Default empty.
 * @param string $after  Optional. Output after the date. Default empty.
 * @param bool   $echo   Optional. Whether to echo the date or return it. Default true.
 * @return string|void String if retrieving.
 */
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|false $the_modified_date The last modified date or false if no post is found.
     * @param string       $format            PHP date format.
     * @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;
    }
}

WordPress Version: 5.6

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
 * @param string $before Optional. Output before the date. Default empty.
 * @param string $after  Optional. Output after the date. Default empty.
 * @param bool   $echo   Optional. Whether to echo the date or return it. Default true.
 * @return string|void String if retrieving.
 */
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|false $the_modified_date The last modified date or false if no post is found.
     * @param string       $format            PHP date format.
     * @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;
    }
}

WordPress Version: 5.5

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $format Optional. PHP date format defaults to the date_format option if not specified.
 * @param string $before Optional. Output before the date.
 * @param string $after  Optional. Output after the date.
 * @param bool   $echo   Optional. Whether to echo the date or return it. Default true.
 * @return string|void String if retrieving.
 */
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;
    }
}

WordPress Version: 5.4

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $format Optional. PHP date format defaults to the date_format option if not specified.
 * @param string $before Optional. Output before the date.
 * @param string $after  Optional. Output after the date.
 * @param bool   $echo   Optional, default is display. Whether to echo the date or return it.
 * @return string|void String if retrieving.
 */
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;
    }
}

WordPress Version: 4.6

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $d      Optional. PHP date format defaults to the date_format option if not specified.
 * @param string $before Optional. Output before the date.
 * @param string $after  Optional. Output after the date.
 * @param bool   $echo   Optional, default is display. Whether to echo the date or return it.
 * @return string|void String if retrieving.
 */
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;
    }
}

WordPress Version: 4.3

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $d      Optional. PHP date format defaults to the date_format option if not specified.
 * @param string $before Optional. Output before the date.
 * @param string $after  Optional. Output after the date.
 * @param bool   $echo   Optional, default is display. Whether to echo the date or return it.
 * @return string|void String if retrieving.
 */
function the_modified_date($d = '', $before = '', $after = '', $echo = true)
{
    $the_modified_date = $before . get_the_modified_date($d) . $after;
    /**
     * Filter 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;
    }
}

WordPress Version: 3.9

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
 * @param string $before Optional. Output before the date.
 * @param string $after Optional. Output after the date.
 * @param bool $echo Optional, default is display. Whether to echo the date or return it.
 * @return string|null Null if displaying, string if retrieving.
 */
function the_modified_date($d = '', $before = '', $after = '', $echo = true)
{
    $the_modified_date = $before . get_the_modified_date($d) . $after;
    /**
     * Filter 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;
    }
}

WordPress Version: 3.7

/**
 * Display the date on which the post was last modified.
 *
 * @since 2.1.0
 *
 * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
 * @param string $before Optional. Output before the date.
 * @param string $after Optional. Output after the date.
 * @param bool $echo Optional, default is display. Whether to echo the date or return it.
 * @return string|null Null if displaying, string if retrieving.
 */
function the_modified_date($d = '', $before = '', $after = '', $echo = true)
{
    $the_modified_date = $before . get_the_modified_date($d) . $after;
    $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;
    }
}