[wp-trac] [WordPress Trac] #28425: get_permalink passes only post ID to called functions instead of post object

WordPress Trac noreply at wordpress.org
Sun Jun 1 13:05:23 UTC 2014


#28425: get_permalink passes only post ID to called functions instead of post
object
-------------------------------+-----------------------------
 Reporter:  arnee              |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:  performance        |
-------------------------------+-----------------------------
 The function '''get_permalink''' passes only the ID of the post to the
 called functions ''get_page_link'', ''get_attachment_link'' and
 ''get_post_permalink''.

 This will result in an additional post-resolving with eventually a
 database call in some situations.

 Since get_permalink already resolved the post, it should only pass the
 object.

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


More information about the wp-trac mailing list