[wp-trac] [WordPress Trac] #33306: Only Query for author ID if user is member of blog

WordPress Trac noreply at wordpress.org
Sat Aug 29 23:12:35 UTC 2015


#33306: Only Query for author ID if user is member of blog
-------------------------+-------------------------------------
 Reporter:  sboisvert    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:  4.3
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  multisite, performance
-------------------------+-------------------------------------

Comment (by sboisvert):

 Thanks for having a look Boone!

 Regarding the edge case, while it might change the current behaviour, I'm
 not sure if current behaviour is expected behaviour (in regards to
 lowering someone's permissions and they can still see the private posts
 they authored. (But as you mention this is probably an edge case either
 way).

 I agree that current_user_can() is more applicable in terms of what we
 want to achieve in terms of optimizing the queries and given that in some
 cases it can be a dramatic boost I would think it's worth it.
 Current_user_can would apply this optimization to many more people than
 the multisite and member of blog check and again even with the edge cases
 I feel like this is worth it.

 I do agree with #30911 that a re-organization of the post status logic
 would be best.

 Is there something I can help with for this ticket?

 Thanks

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


More information about the wp-trac mailing list