[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
Sun Jun 19 10:49:24 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                                          |     Focuses:
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * keywords:  good-first-bug has-patch has-unit-tests commit => good-first-
     bug has-patch has-unit-tests


Comment:

 Post commit [37738] @azaozz and I had a brief
 [https://wordpress.slack.com/archives/core/p1466142319000700 chat in
 Slack] re backcompat.

 Previously, if called before the global `$post` object was set, the value
 `false` would be run through the filter. Now, if the post is called before
 the global `$post` object is set, the function returns false and bypasses
 the filter.

 [attachment:37059.2.diff] restores the old behavior of passing a failure
 to get the post though the filter.

 I'm genuinely undecided on how much it matters, the old behavior could
 only have occurred before the `posts_selection` action.

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


More information about the wp-trac mailing list