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

WordPress Trac noreply at wordpress.org
Tue Jun 3 11:53:31 UTC 2014


#28425: get_permalink passes only post ID to called functions instead of post
object
-------------------------------+--------------------------
 Reporter:  arnee              |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  4.0
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:  performance
-------------------------------+--------------------------

Comment (by kovshenin):

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

 Can you provide some examples of such situations? I can be wrong, but
 afaik if the post has been fetched before, `get_post()` will simply get
 the post from cache via `WP_Post::get_instance()`.

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


More information about the wp-trac mailing list