[wp-trac] [WordPress Trac] #55978: Adding optional post parameter to get_the_modified_author function

WordPress Trac noreply at wordpress.org
Tue Jun 14 17:57:41 UTC 2022


#55978: Adding optional post parameter to get_the_modified_author function
-------------------------------+-------------------------------
 Reporter:  samirmalpande      |      Owner:  (none)
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:  changes-requested
  Focuses:                     |
-------------------------------+-------------------------------
 With the current implementation of the `get_the_modified_author()` it is
 not possible to use this function with the custom WP_Query loop. It takes
 the post ID using the `get_post()` which returns the global post id and
 there is no way to pass the ID from the custom query.

 We want to add the optional post parameter in `get_the_modified_author`
 function so that we can use this function in custom loops as well.

 By doing this change we also make this function follow the same standard
 as other "get_the_" functions like `get_the_title`, `get_the_content`,
 `get_the_terms` etc.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55978>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list