Add register post type argument #145

Merged
merged 2 commits into from Apr 29, 2014

Conversation

Projects
None yet
2 participants
@rmccue
Member

rmccue commented Apr 20, 2014

Add the show_in_json argument to register_post_type to control whether the type is available via the API.

Also picks up a couple of missed instances that we had; /posts/<id>/comments in particular, which didn't check that the post was valid.

Fixes #136.

@rmccue

This comment has been minimized.

Show comment Hide comment
@rmccue

rmccue Apr 20, 2014

Member

Whoops, this was wrong. Correcting.

Member

rmccue commented Apr 20, 2014

Whoops, this was wrong. Correcting.

@rmccue rmccue added this to the 1.0 milestone Apr 20, 2014

@rmccue rmccue added the Enhancement label Apr 20, 2014

@rmccue

This comment has been minimized.

Show comment Hide comment
@rmccue

rmccue Apr 20, 2014

Member

@iandunn Look good to you? :)

Member

rmccue commented Apr 20, 2014

@iandunn Look good to you? :)

@iandunn

This comment has been minimized.

Show comment Hide comment
@iandunn

iandunn Apr 21, 2014

This looks good in my tests. The only question I have is, what was the reason being making an exception so that the post type is protected, even though it's publicly_queryable?

iandunn commented Apr 21, 2014

This looks good in my tests. The only question I have is, what was the reason being making an exception so that the post type is protected, even though it's publicly_queryable?

@rmccue

This comment has been minimized.

Show comment Hide comment
@rmccue

rmccue Apr 23, 2014

Member

he only question I have is, what was the reason being making an exception so that the post type is protected, even though it's publicly_queryable?

Oh, whoops, I think this was a debugging line I put in. :)

Member

rmccue commented Apr 23, 2014

he only question I have is, what was the reason being making an exception so that the post type is protected, even though it's publicly_queryable?

Oh, whoops, I think this was a debugging line I put in. :)

Remove post show_in_json debugging line
Accidentally committed this, apologies!
@rmccue

This comment has been minimized.

Show comment Hide comment
@rmccue

rmccue Apr 28, 2014

Member

@iandunn Can you give this one a quick review? Will merge afterwards. :)

Member

rmccue commented Apr 28, 2014

@iandunn Can you give this one a quick review? Will merge afterwards. :)

@iandunn

This comment has been minimized.

Show comment Hide comment
@iandunn

iandunn Apr 29, 2014

Looks good to me :)

iandunn commented Apr 29, 2014

Looks good to me :)

rmccue added a commit that referenced this pull request Apr 29, 2014

@rmccue rmccue merged commit 6d6cde3 into master Apr 29, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@rmccue rmccue deleted the add-register-post-type-argument branch Apr 29, 2014

kellbot pushed a commit to kellbot/WP-API that referenced this pull request Aug 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment