Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #32243, comment 3


Ignore:
Timestamp:
05/04/2015 12:34:49 AM (11 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32243, comment 3

    v1 v2  
    11Thanks for the patch, nikonratm!
    22
    3 Your `$cap_final` logic doesn't look like it will work properly. Say I'm querying for three post types: `array( 'foo', 'bar', 'baz' )`. And let's say that I have the `read_private_posts` cap for  'baz' but not for 'foo' and 'bar'. In this situation, it looks like the last post type cap will overwrite the previous two, and private posts for all three post types will be returned. If we're going to add this improvement, the SQL will need to look like this:
     3Your `$cap_final` logic doesn't look like it will work properly. Say I'm querying for three post types: `array( 'foo', 'bar', 'baz' )`. And let's say that I have the `read_private_posts` cap for  'baz' but not for 'foo' and 'bar'. In this situation, it looks like the last post type cap will overwrite the previous two, and private posts for all three post types will be returned. If we're going to add the improvement suggested in this ticket, the SQL will need to look like this:
    44
    55{{{