Summery Summery
Retrieve the date on which the post was written.
Syntax Syntax
Description Description
Unlike the_date() this function will always return the date. Modify output with the ‘get_the_date’ filter.
Parameters Parameters
- $format
-
(Optional) PHP date format defaults to the date_format option if not specified.
Default value: ''
- $post
-
(Optional) Post ID or WP_Post object. Default current post.
Default value: null
Return Return
(string|false) Date the current post was written. False on failure.
Source Source
File: wp-includes/general-template.php
* Filters the HTML calendar output.
*
* @since 3.0.0
*
* @param string $calendar_output HTML output of the calendar.
*/
echo apply_filters( 'get_calendar', $calendar_output );
return;
}
/** This filter is documented in wp-includes/general-template.php */
return apply_filters( 'get_calendar', $calendar_output );
}
/**
* Purge the cached results of get_calendar.
*
* @see get_calendar
* @since 2.1.0
*/
function delete_get_calendar_cache() {
wp_cache_delete( 'get_calendar', 'calendar' );
}
/**
* Display all of the allowed tags in HTML format with attributes.
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |