From 3e94d3a931953e3f3e3fe949fdb4c0f8e248b990 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 8 Nov 2014 21:08:45 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 21 +++++++++++++-------- wp-includes/version.php | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 68f89d660b..81cd12a12e 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 * 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 * - * @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'. - * @return string The date the post was last modified. + * @return string The timestamp. */ function get_lastpostmodified( $timezone = 'server' ) { $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 $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 ); } /** - * 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 + * @access private * - * @param string $timezone The location to get the time. Accepts 'gmt', 'blog', or 'server'. - * @param string $field Field to check. Can be 'date' or 'modified'. - * @return string The date. + * @param string $timezone The timezone for the timestamp. See {@see get_lastpostmodified()} + * for information on accepted values. + * @param string $field Post field to check. Accepts 'date' or 'modified'. + * @return string The timestamp. */ function _get_last_post_time( $timezone, $field ) { global $wpdb; diff --git a/wp-includes/version.php b/wp-includes/version.php index ae13de2344..4ca31360e4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.