-
Notifications
You must be signed in to change notification settings - Fork 654
Clarify expectations and impact of the 'show_in_json` Post Type flag #710
Comments
@rachelbaker I agree on option 2 |
I like option 2, and would rename to |
Option 2 was implemented in 0188656 with the |
|
So |
@danielbachhuber I closed this because you already had #769 and #820 and looked like you were running with renaming the json flag. |
Oh. Let's keep it open until we have a final decision. I'm ambivalent on the naming, but I don't think we should allow access to any post type operations if false. |
Sticking with The endpoints will only be registered if it's set to true for the post type |
@WP-API/amigos
I brought this up in Slack yesterday (https://wordpress.slack.com/archives/core-restapi/p1418160531000324) but wanted to bring the conversation to open up for more timezone friendly discussions.
If a post_type was registered as
"show_in_json" => false,
does that mean:post_type
cannot be read by anyone, but authenticated users (with the appropriate $post_type capabilities) can still edit or update objects? Current Behaviorpost_type
cannot be read/edited/created by anyone, no matter the authentication level?It seems to me that
show_in_json
is a post_type level flag that applies to all users no matter their authentication level much like the other post_type registration flags such as:My vote is for the behavior of the 2nd option above.
If you are leaning toward the 1st option, riddle me this: what do we provide as a response if an authenticated user edits a Post when the
post_type
is set to false? Should we provide the Post object in the response, even though thepost_type
hasshow_in_json
set to false?The text was updated successfully, but these errors were encountered: