mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Fix incorrect documentation in the DocBlocks for get_lastpostmodified()
and _get_last_post_time()
.
Props ericlewis for the initial patch. Fixes #30249. Built from https://develop.svn.wordpress.org/trunk@30287 git-svn-id: http://core.svn.wordpress.org/trunk@30287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
112f854021
commit
3e94d3a931
@ -5327,7 +5327,7 @@ function get_lastpostdate( $timezone = 'server' ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve last post modified date depending on timezone.
|
* Get the timestamp of the last time any post was modified.
|
||||||
*
|
*
|
||||||
* The server timezone is the default and is the difference between GMT and
|
* The server timezone is the default and is the difference between GMT and
|
||||||
* server time. The 'blog' value is just when the last post was modified. The
|
* server time. The 'blog' value is just when the last post was modified. The
|
||||||
@ -5335,9 +5335,12 @@ function get_lastpostdate( $timezone = 'server' ) {
|
|||||||
*
|
*
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
*
|
*
|
||||||
* @param string $timezone The location to get the time. Accepts 'gmt', 'blog', or 'server'.
|
* @param string $timezone Optional. The timezone for the timestamp. Uses the server's internal timezone.
|
||||||
|
* Accepts 'server', 'blog', 'gmt'. or 'server'. 'server' uses the server's
|
||||||
|
* internal timezone. 'blog' uses the `post_modified` field, which proxies
|
||||||
|
* to the timezone set for the site. 'gmt' uses the `post_modified_gmt` field.
|
||||||
* Default 'server'.
|
* Default 'server'.
|
||||||
* @return string The date the post was last modified.
|
* @return string The timestamp.
|
||||||
*/
|
*/
|
||||||
function get_lastpostmodified( $timezone = 'server' ) {
|
function get_lastpostmodified( $timezone = 'server' ) {
|
||||||
$lastpostmodified = _get_last_post_time( $timezone, 'modified' );
|
$lastpostmodified = _get_last_post_time( $timezone, 'modified' );
|
||||||
@ -5353,19 +5356,21 @@ function get_lastpostmodified( $timezone = 'server' ) {
|
|||||||
*
|
*
|
||||||
* @param string $lastpostmodified Date the last post was modified.
|
* @param string $lastpostmodified Date the last post was modified.
|
||||||
* @param string $timezone Location to use for getting the post modified date.
|
* @param string $timezone Location to use for getting the post modified date.
|
||||||
|
* See {@see get_lastpostmodified()} for accepted `$timezone` values.
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
|
return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve latest post date data based on timezone.
|
* Get the timestamp of the last time any post was modified or published.
|
||||||
*
|
*
|
||||||
* @access private
|
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
|
* @access private
|
||||||
*
|
*
|
||||||
* @param string $timezone The location to get the time. Accepts 'gmt', 'blog', or 'server'.
|
* @param string $timezone The timezone for the timestamp. See {@see get_lastpostmodified()}
|
||||||
* @param string $field Field to check. Can be 'date' or 'modified'.
|
* for information on accepted values.
|
||||||
* @return string The date.
|
* @param string $field Post field to check. Accepts 'date' or 'modified'.
|
||||||
|
* @return string The timestamp.
|
||||||
*/
|
*/
|
||||||
function _get_last_post_time( $timezone, $field ) {
|
function _get_last_post_time( $timezone, $field ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30286';
|
$wp_version = '4.1-alpha-30287';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user