[wp-trac] [WordPress Trac] #37059: Allow post to be passed to get_the_modified_time & get_the_modified_date

WordPress Trac noreply at wordpress.org
Fri Jun 17 06:01:36 UTC 2016


#37059: Allow post to be passed to get_the_modified_time & get_the_modified_date
-------------------------------------------------+-------------------------
 Reporter:  peterwilsoncc                        |       Owner:
     Type:  enhancement                          |  peterwilsoncc
 Priority:  normal                               |      Status:  reopened
Component:  Posts, Post Types                    |   Milestone:  4.6
 Severity:  normal                               |     Version:
 Keywords:  good-first-bug has-patch has-unit-   |  Resolution:
  tests commit                                   |     Focuses:
-------------------------------------------------+-------------------------
Changes (by sebastian.pisula):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I think that in get_the_modified_date() this code
 {{{
 $post = get_post( $post );

         if ( ! $post ) {
                 return false;
         }
 }}}

 is unnecessary because in get_post_modified_time check valid $variable and
 function get_post_modified_time() is called always

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37059#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list