WordPress.org

Make WordPress Core

Ticket #47777: patch.diff

File patch.diff, 1022 bytes (added by munyagu, 13 months ago)

add $post_type

  • src/wp-includes/post.php

     
    63156315
    63166316        $lastpostmodified = _get_last_post_time( $timezone, 'modified', $post_type );
    63176317
    6318         $lastpostdate = get_lastpostdate( $timezone );
     6318        $lastpostdate = get_lastpostdate( $timezone, $post_type );
    63196319        if ( $lastpostdate > $lastpostmodified ) {
    63206320                $lastpostmodified = $lastpostdate;
    63216321        }
     
    63286328         * @param string $lastpostmodified Date the last post was modified.
    63296329         * @param string $timezone         Location to use for getting the post modified date.
    63306330         *                                 See get_lastpostdate() for accepted `$timezone` values.
     6331         * @param string $post_type        The post type to check.
    63316332         */
    6332         return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
     6333        return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone, $post_type );
    63336334}
    63346335
    63356336/**