Use show_in_rest to determine "public" post types to check - #2384
Conversation
Whether or not a user should appear in the REST API should be determined by whether they have any posts that appear in the API, not public posts generally. From 71800a9
|
@joehoyle Why did you change this originally? |
|
Would this mean that someone with a published public post of a type with show_in_rest => false does not pop up? Meaning other people can see it but rest api can't? |
More or less, yes. |
|
@danielbachhuber I think this was intentional (though maybe incorrect) because I was trying to not disclose any more users than are already exposed via the public site (author of published posts). |
|
Yeah, I think technically you could have non-public posts that have show_in_rest, and vice-versa. Maybe we need both? |
Yep.
Personally, I don't think so. I think we should use |
|
The more I thought about this, the more I agree with the idea of only show_in_rest => true. This is the REST API so if something is set to not show up in it, show_in_rest => false, why should it, just because it is marked public etc? Same for the reverse case as well and non-public posts would just be handled as non-public posts as a separate concern. |
Whether or not a user should appear in the REST API should be determined by whether they have any posts that appear in the API, not public posts generally.
From 71800a9 and #2155