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

WordPress Trac noreply at wordpress.org
Sat Sep 5 14:24:27 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 boonebgorges):

 Thanks, jeremyfelt. I think I see how 'edit_posts' could be too
 restrictive.

 How about 'read'? All Subscribers should have this cap. On non-MS, it'll
 be functionally redundant with the `is_user_logged_in()` check a few lines
 above. On MS, it should limit to members of the blog, which is what
 sboivert initially wanted. The benefits over the suggested solution are
 (a) no ugly `is_multisite()` check, and (b) no pulling up blog details
 inside of `is_user_member_of_blog()`.

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


More information about the wp-trac mailing list